diff --git a/.gitignore b/.gitignore index c13c9f367d..7d7e2d3471 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ zulip.kdev4 *.DS_Store # .cache/ is generated by VSCode's test runner .cache/ +.eslintcache ## Miscellaneous # (Ideally this section is empty.) diff --git a/package.json b/package.json index c3fd34f76d..59a830b471 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tools/lint b/tools/lint index 9a5d34aa3a..4b7b062e87 100755 --- a/tools/lint +++ b/tools/lint @@ -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'])