Просмотр исходного кода

Merge pull request #5574 from overleaf/jpa-bulk-lint-format

[misc] set up bulk lint/format in dev-env

GitOrigin-RevId: 6f7939c4c732bca72c9b658491e2c4c851c82b44
Jakob Ackermann 4 лет назад
Родитель
Сommit
4b996c53d3

+ 2 - 1
libraries/logger/package.json

@@ -12,7 +12,8 @@
     "test": "mocha --grep=$MOCHA_GREP test/**/*.js",
     "format": "prettier-eslint $PWD'/**/*.js' --list-different",
     "format:fix": "prettier-eslint $PWD'/**/*.js' --write",
-    "lint": "eslint -f unix .",
+    "lint": "eslint --max-warnings 0 --format unix .",
+    "lint:fix": "eslint --fix .",
     "test:ci": "npm run test"
   },
   "dependencies": {

+ 2 - 1
libraries/metrics/package.json

@@ -33,7 +33,8 @@
     "sinon": "^9.0.2"
   },
   "scripts": {
-    "lint": "eslint --max-warnings 0 .",
+    "lint": "eslint --max-warnings 0 --format unix .",
+    "lint:fix": "eslint --fix .",
     "test:unit": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/unit",
     "test:acceptance": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/acceptance",
     "test": "npm run test:unit && npm run test:acceptance",

+ 4 - 2
libraries/o-error/package.json

@@ -24,13 +24,15 @@
     "build:compile": "babel index.js --out-dir dist",
     "declaration:build": "rm -f dist/index.d.ts && tsc --allowJs --declaration --emitDeclarationOnly --outDir dist --moduleResolution node --target ES6 index.js",
     "declaration:check": "git diff --exit-code -- dist/index.d.ts",
-    "lint": "eslint .",
+    "lint": "eslint --max-warnings 0 --format unix .",
+    "lint:fix": "eslint --fix .",
     "prepublishOnly": "npm run --silent declaration:build && npm run --silent declaration:check",
     "test": "mocha",
     "test:coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
     "typecheck": "tsc --allowJs --checkJs --noEmit --moduleResolution node --strict --target ES6 *.js test/**/*.js",
     "update-readme": "doc/update-readme.js",
-    "format": "echo noop",
+    "format": "prettier $PWD'/**/*.js' --list-different",
+    "format:fix": "prettier $PWD'/**/*.js' --write",
     "test:ci": "npm run typecheck && npm run test"
   },
   "author": "Overleaf (https://www.overleaf.com)",

+ 2 - 1
libraries/object-persistor/package.json

@@ -6,7 +6,8 @@
   "scripts": {
     "test": "npm run lint && npm run format && npm run test:unit",
     "test:unit": "mocha",
-    "lint": "eslint src test *.js",
+    "lint": "eslint --max-warnings 0 --format unix .",
+    "lint:fix": "eslint --fix .",
     "format": "prettier-eslint $PWD'/**/*.js' --list-different",
     "format:fix": "prettier-eslint $PWD'/**/*.js' --write",
     "test:ci": "npm run test:unit"

+ 2 - 1
libraries/redis-wrapper/package.json

@@ -11,7 +11,8 @@
   "repository": "github:overleaf/redis-wrapper",
   "license": "ISC",
   "scripts": {
-    "lint": "eslint --max-warnings 0 .",
+    "lint": "eslint --max-warnings 0 --format unix .",
+    "lint:fix": "eslint --fix .",
     "format": "prettier-eslint $PWD'/**/*.js' --list-different",
     "format:fix": "prettier-eslint $PWD'/**/*.js' --write",
     "test": "mocha --recursive test/unit/src/",

+ 2 - 0
libraries/settings/package.json

@@ -5,6 +5,8 @@
   "repository": "overleaf/settings-module",
   "scripts": {
     "lint": "echo noop",
+    "lint:fix": "echo noop",
+    "format:fix": "echo noop",
     "format": "echo noop",
     "test": "echo noop",
     "test:ci": "echo noop"