From 62e09c6441d27d6274d352b839906a990fdea8d9 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 29 Jan 2020 00:30:29 -0800 Subject: [PATCH 1/2] speed up lint, add lint-full/format-full, make sure use lint-full --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bb6a4e3ba..dce5b9f64 100644 --- a/package.json +++ b/package.json @@ -43,17 +43,19 @@ "test-node-coverage-html": "nyc --reporter=lcov --reporter=html mocha --recursive test/a/* */pp test/modules ts/test libloki/test/node", "eslint": "eslint .", "lint": "yarn format --list-different && yarn lint-windows", + "lint-full": "yarn format-full --list-different; yarn lint-windows", "dev-lint": "yarn format --list-different; yarn lint-windows", "lint-windows": "yarn eslint && yarn tslint", "lint-deps": "node ts/util/lint/linter.js", "tslint": "tslint --format stylish --project .", - "format": "prettier --write \"*.{css,js,json,md,scss,ts,tsx}\" \"./**/*.{css,js,json,md,scss,ts,tsx}\"", + "format": "prettier --write `git ls-files --modified *.{css,js,json,md,scss,ts,tsx}` `git ls-files --modified ./**/*.{css,js,json,md,scss,ts,tsx}`", + "format-full": "prettier --write \"*.{css,js,json,md,scss,ts,tsx}\" \"./**/*.{css,js,json,md,scss,ts,tsx}\"", "transpile": "tsc", "clean-transpile": "rimraf ts/**/*.js && rimraf ts/*.js", "open-coverage": "open coverage/lcov-report/index.html", "styleguide": "styleguidist server", "pow-metrics": "node metrics_app.js localhost 9000", - "ready": "yarn clean-transpile && yarn grunt && yarn lint && yarn test-node && yarn test-electron && yarn lint-deps" + "ready": "yarn clean-transpile && yarn grunt && yarn lint-full && yarn test-node && yarn test-electron && yarn lint-deps" }, "dependencies": { "@journeyapps/sqlcipher": "https://github.com/scottnonnenberg-signal/node-sqlcipher.git#2e28733b61640556b0272a3bfc78b0357daf71e6", From 0daccb87859290e51eb35163964e38c54d614cd6 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 29 Jan 2020 17:01:44 -0800 Subject: [PATCH 2/2] cache eslint on `lint` but not `ready` --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dce5b9f64..fadab4274 100644 --- a/package.json +++ b/package.json @@ -41,11 +41,13 @@ "test-node": "mocha --recursive --exit test/app test/modules ts/test libloki/test/node", "test-node-coverage": "nyc --reporter=lcov --reporter=text mocha --recursive test/app test/modules ts/test libloki/test/node", "test-node-coverage-html": "nyc --reporter=lcov --reporter=html mocha --recursive test/a/* */pp test/modules ts/test libloki/test/node", - "eslint": "eslint .", + "eslint": "eslint --cache .", + "eslint-full": "eslint .", "lint": "yarn format --list-different && yarn lint-windows", - "lint-full": "yarn format-full --list-different; yarn lint-windows", + "lint-full": "yarn format-full --list-different; yarn lint-windows-full", "dev-lint": "yarn format --list-different; yarn lint-windows", "lint-windows": "yarn eslint && yarn tslint", + "lint-windows-full": "yarn eslint-full && yarn tslint", "lint-deps": "node ts/util/lint/linter.js", "tslint": "tslint --format stylish --project .", "format": "prettier --write `git ls-files --modified *.{css,js,json,md,scss,ts,tsx}` `git ls-files --modified ./**/*.{css,js,json,md,scss,ts,tsx}`",