Skip to content

Commit

Permalink
build: add eslint --cache file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aloisklink committed Aug 27, 2022
1 parent cde3a7c commit b7f9495
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ Gemfile.lock
/.vs

cypress/screenshots/
cypress/snapshots/
cypress/snapshots/

# eslint --cache file
.eslintcache
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b7f9495

Please sign in to comment.