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

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

GitOrigin-RevId: 6f7939c4c732bca72c9b658491e2c4c851c82b44
This commit is contained in:
Jakob Ackermann 2021-10-27 11:50:17 +02:00 committed by Copybot
parent 638fbd5510
commit 4b996c53d3
6 changed files with 14 additions and 6 deletions

View file

@ -12,7 +12,8 @@
"test": "mocha --grep=$MOCHA_GREP test/**/*.js", "test": "mocha --grep=$MOCHA_GREP test/**/*.js",
"format": "prettier-eslint $PWD'/**/*.js' --list-different", "format": "prettier-eslint $PWD'/**/*.js' --list-different",
"format:fix": "prettier-eslint $PWD'/**/*.js' --write", "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" "test:ci": "npm run test"
}, },
"dependencies": { "dependencies": {

View file

@ -33,7 +33,8 @@
"sinon": "^9.0.2" "sinon": "^9.0.2"
}, },
"scripts": { "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:unit": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/unit",
"test:acceptance": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/acceptance", "test:acceptance": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/acceptance",
"test": "npm run test:unit && npm run test:acceptance", "test": "npm run test:unit && npm run test:acceptance",

View file

@ -24,13 +24,15 @@
"build:compile": "babel index.js --out-dir dist", "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: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", "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", "prepublishOnly": "npm run --silent declaration:build && npm run --silent declaration:check",
"test": "mocha", "test": "mocha",
"test:coverage": "nyc --reporter=lcov --reporter=text-summary npm run test", "test:coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
"typecheck": "tsc --allowJs --checkJs --noEmit --moduleResolution node --strict --target ES6 *.js test/**/*.js", "typecheck": "tsc --allowJs --checkJs --noEmit --moduleResolution node --strict --target ES6 *.js test/**/*.js",
"update-readme": "doc/update-readme.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" "test:ci": "npm run typecheck && npm run test"
}, },
"author": "Overleaf (https://www.overleaf.com)", "author": "Overleaf (https://www.overleaf.com)",

View file

@ -6,7 +6,8 @@
"scripts": { "scripts": {
"test": "npm run lint && npm run format && npm run test:unit", "test": "npm run lint && npm run format && npm run test:unit",
"test:unit": "mocha", "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": "prettier-eslint $PWD'/**/*.js' --list-different",
"format:fix": "prettier-eslint $PWD'/**/*.js' --write", "format:fix": "prettier-eslint $PWD'/**/*.js' --write",
"test:ci": "npm run test:unit" "test:ci": "npm run test:unit"

View file

@ -11,7 +11,8 @@
"repository": "github:overleaf/redis-wrapper", "repository": "github:overleaf/redis-wrapper",
"license": "ISC", "license": "ISC",
"scripts": { "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": "prettier-eslint $PWD'/**/*.js' --list-different",
"format:fix": "prettier-eslint $PWD'/**/*.js' --write", "format:fix": "prettier-eslint $PWD'/**/*.js' --write",
"test": "mocha --recursive test/unit/src/", "test": "mocha --recursive test/unit/src/",

View file

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