Skip to content

Commit

Permalink
tools: replace custom assert.fail lint rule
Browse files Browse the repository at this point in the history
Replace custom lint rule for `assert.fail()` function signature errors
with a restricted-syntax rule.

PR-URL: #12287
Reviewed-By: Teddy Katz <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Jul 11, 2017
1 parent d9866ce commit 6142747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ rules:
}, {
selector: "ThrowStatement > CallExpression[callee.name=/Error$/]",
message: "Use new keyword when throwing an Error."
}, {
selector: "CallExpression[callee.object.name='assert'][callee.property.name='fail'][arguments.length=1]",
message: "assert.fail() message should be third argument"
}]
no-tabs: 2
no-trailing-spaces: 2
Expand Down Expand Up @@ -143,7 +146,6 @@ rules:

# Custom rules in tools/eslint-rules
align-multiline-assignment: 2
assert-fail-single-argument: 2
assert-throws-arguments: [2, { requireTwo: false }]
no-useless-regex-char-class-escape: [2, { override: ['[', ']'] }]

Expand Down
30 changes: 0 additions & 30 deletions tools/eslint-rules/assert-fail-single-argument.js

This file was deleted.

0 comments on commit 6142747

Please sign in to comment.