eslint: add --cache flag for faster linting

This commit is contained in:
cPhost 2017-12-06 19:56:39 -05:00 committed by showell
parent 59b0776c53
commit c6985e2eee
3 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@ -62,6 +62,7 @@ zulip.kdev4
*.DS_Store
# .cache/ is generated by VSCode's test runner
.cache/
.eslintcache
## Miscellaneous
# (Ideally this section is empty.)

View File

@ -60,8 +60,9 @@
"xmlhttprequest": "1.5.0"
},
"scripts": {
"lint": "eslint --quiet",
"lint-loud": "eslint static/js frontend_tests"
"lint": "eslint --quiet --cache",
"lint-fix": "eslint --quiet --fix",
"lint-loud": "eslint static/js frontend_tests --cache"
},
"repository": {
"type": "git",

View File

@ -159,7 +159,7 @@ def run():
external_linter('add_class', ['tools/find-add-class'], ['js'])
external_linter('css', ['tools/check-css'], ['css'])
external_linter('eslint', ['node', 'node_modules/.bin/eslint', '--quiet'], ['js'])
external_linter('eslint', ['node', 'node_modules/.bin/eslint', '--quiet', '--cache'], ['js'])
external_linter('tslint', ['node', 'node_modules/.bin/tslint', '-c',
'static/ts/tslint.json'], ['ts'])
external_linter('puppet', ['puppet', 'parser', 'validate'], ['pp'])