Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: tools/web_dev_style/js_checker.py

Issue 2917473002: js_checker.py: Restore smoke tests for linting violations. (Closed)
Patch Set: Address nits. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « PRESUBMIT_test_mocks.py ('k') | tools/web_dev_style/js_checker_eslint_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/web_dev_style/js_checker.py
diff --git a/tools/web_dev_style/js_checker.py b/tools/web_dev_style/js_checker.py
index 7d48c3f853bacc7a347a74a378355139f50f4133..79e0895971cea937e7adae075dfa05ff334f8c73 100644
--- a/tools/web_dev_style/js_checker.py
+++ b/tools/web_dev_style/js_checker.py
@@ -62,7 +62,7 @@ class JSChecker(object):
return self.RegexCheck(i, line, r"(?<!this)(\.\$)[\[\.]",
"Please only use this.$.localId, not element.$.localId")
- def RunEsLintChecks(self, affected_js_files):
+ def RunEsLintChecks(self, affected_js_files, format='stylish'):
"""Runs lint checks using ESLint. The ESLint rules being applied are defined
in the .eslintrc.js configuration file.
"""
@@ -89,6 +89,7 @@ class JSChecker(object):
output = node.RunNode([
node_modules.PathToEsLint(),
'--color',
+ '--format', format,
'--ignore-pattern \'!.eslintrc.js\'',
' '.join(affected_js_files_paths)])
« no previous file with comments | « PRESUBMIT_test_mocks.py ('k') | tools/web_dev_style/js_checker_eslint_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698