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

Unified Diff: tools/web_dev_style/js_checker.py

Issue 2913453002: js_checker.py: Replace custom WrapperTypeCheck with ESLint's no-new-wrappers. (Closed)
Patch Set: Add smoke tests. 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
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 79e0895971cea937e7adae075dfa05ff334f8c73..00a16e32356b24540e360bfb9ecf7a9d4d50fb18 100644
--- a/tools/web_dev_style/js_checker.py
+++ b/tools/web_dev_style/js_checker.py
@@ -95,13 +95,6 @@ class JSChecker(object):
return [self.output_api.PresubmitError(output)] if output else []
- def WrapperTypeCheck(self, i, line):
- """Check for wrappers (new String()) instead of builtins (string)."""
- return self.RegexCheck(i, line,
- r"(?:/\*)?\*.*?@(?:param|return|type) ?" # /** @param/@return/@type
- r"{[^}]*\b(String|Boolean|Number)\b[^}]*}", # {(Boolean|Number|String)}
- "Don't use wrapper types (i.e. new String() or @type {String})")
-
def VarNameCheck(self, i, line):
"""See the style guide. http://goo.gl/eQiXVW"""
return self.RegexCheck(i, line,
@@ -140,7 +133,6 @@ class JSChecker(object):
self.ExtraDotInGenericCheck(i, line),
self.InheritDocCheck(i, line),
self.PolymerLocalIdCheck(i, line),
- self.WrapperTypeCheck(i, line),
self.VarNameCheck(i, line),
])

Powered by Google App Engine
This is Rietveld 408576698