mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
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:
@@ -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,
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user