From b7f9495a1434e620ff475d46b6c98834ce34bc77 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Sat, 27 Aug 2022 17:32:29 +0100 Subject: [PATCH] build: add eslint --cache file Currently, doing a `git commit` is a bit low, as eslint runs before the commit. Adding an `eslint --cache` makes it slightly faster. On my PC, `git commit` currently is `Done in 12.24s.` However, after adding this cache file, it is `Done in 7.54s.`, so about 1.6x faster. --- .gitignore | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8ce4bf724..c5c4338e5 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ Gemfile.lock /.vs cypress/screenshots/ -cypress/snapshots/ \ No newline at end of file +cypress/snapshots/ + +# eslint --cache file +.eslintcache diff --git a/package.json b/package.json index 065d8d6da..8c05cb17c 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "postbuild": "documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md", "build:watch": "yarn build:development --watch", "release": "yarn build", - "lint": "eslint ./ --ext .js,.json,.html,.md", + "lint": "eslint --cache ./ --ext .js,.json,.html,.md", "lint:fix": "yarn lint --fix", "e2e:depr": "yarn lint && jest e2e --config e2e/jest.config.js", "cypress": "cypress run",