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

Unified Diff: tools/web_dev_style/js_checker.py

Issue 2907763004: js_checker.py: Replace custom GetElementByIdCheck with ESLint no-restricted-properties. (Closed)
Patch Set: Resolve conflicts. 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 | « .eslintrc.js ('k') | tools/web_dev_style/js_checker_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 46cb6fc1498487042af9f6a79f66ccf5b532b8f3..7d48c3f853bacc7a347a74a378355139f50f4133 100644
--- a/tools/web_dev_style/js_checker.py
+++ b/tools/web_dev_style/js_checker.py
@@ -52,12 +52,6 @@ class JSChecker(object):
return self.RegexCheck(i, line, r"((?:Array|Object|Promise)\.<)",
"Don't use a dot after generics (Object.<T> should be Object<T>).")
- def GetElementByIdCheck(self, i, line):
- """Checks for use of 'document.getElementById' instead of '$'."""
- return self.RegexCheck(i, line, r"(document\.getElementById)\('",
- "Use $('id') or getSVGElement('id') from chrome://resources/js/util.js "
- "instead of document.getElementById('id')")
-
def InheritDocCheck(self, i, line):
"""Checks for use of '@inheritDoc' instead of '@override'."""
return self.RegexCheck(i, line, r"\* (@inheritDoc)",
@@ -141,7 +135,6 @@ class JSChecker(object):
self.ChromeSendCheck(i, line),
self.CommentIfAndIncludeCheck(i, line),
self.ConstCheck(i, line),
- self.GetElementByIdCheck(i, line),
self.EndJsDocCommentCheck(i, line),
self.ExtraDotInGenericCheck(i, line),
self.InheritDocCheck(i, line),
« no previous file with comments | « .eslintrc.js ('k') | tools/web_dev_style/js_checker_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698