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 <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott committed Apr 12, 2017
1 parent 0ec0272 commit b3f2e3b
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 @@ -110,6 +110,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 @@ -142,7 +145,6 @@ rules:

# Custom rules in tools/eslint-rules
align-multiline-assignment: 2
assert-fail-single-argument: 2
assert-throws-arguments: [2, { requireTwo: false }]
no-unescaped-regexp-dot: 2

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

This file was deleted.

0 comments on commit b3f2e3b

Please sign in to comment.