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.
This commit is contained in:
Alois Klink 2022-08-27 17:32:29 +01:00
parent cde3a7cf70
commit b7f9495a14
No known key found for this signature in database
GPG Key ID: 4482AA96E51ADF71
2 changed files with 5 additions and 2 deletions

5
.gitignore vendored
View File

@ -22,4 +22,7 @@ Gemfile.lock
/.vs
cypress/screenshots/
cypress/snapshots/
cypress/snapshots/
# eslint --cache file
.eslintcache

View File

@ -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",