custom_check: Avoid use of assert to avoid confusion with assert.equal.

This commit bans the use of `assert` and replaces it
with `assert.ok` to avoid confusion with `assert.equal`.

Fixes #18687.
This commit is contained in:
Riken Shah
2021-06-10 06:32:54 +00:00
committed by Tim Abbott
parent 5e80068134
commit f95c539122
104 changed files with 1396 additions and 1383 deletions

View File

@@ -212,6 +212,12 @@ js_rules = RuleList(
"good_lines": ["#my-style {color: blue;}"],
"bad_lines": ['<p style="color: blue;">Foo</p>', 'style = "color: blue;"'],
},
{
"pattern": r"assert\(",
"description": "Use 'assert.ok' instead of 'assert'. We avoid the use of 'assert' as it can easily be confused with 'assert.equal'.",
"good_lines": ["assert.ok(...)"],
"bad_lines": ["assert(...)"],
},
*whitespace_rules,
],
)