diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 8f6a8798f5..4c9a970e6a 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -202,14 +202,12 @@ js_rules = RuleList( }, { "pattern": "style ?=", + "exclude_pattern": r"(const |\S)style ?=", "description": "Avoid using the `style=` attribute; we prefer styling in CSS files", "exclude": { "frontend_tests/node_tests/copy_and_paste.js", - "frontend_tests/node_tests/upload.js", - "static/js/upload.js", - "static/js/stream_color.js", }, - "good_lines": ["#my-style {color: blue;}"], + "good_lines": ["#my-style {color: blue;}", "const style =", 'some_style = "test"'], "bad_lines": ['

Foo

', 'style = "color: blue;"'], }, {