Skip to content
Permalink
Browse files

tools: replace custom assert.fail lint rule

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 9, 2017
1 parent 0ec0272 commit b3f2e3b7e2793e1f74cd296e85a549d926054225
Showing with 3 additions and 31 deletions.
  1. +3 −1 .eslintrc.yaml
  2. +0 −30 tools/eslint-rules/assert-fail-single-argument.js
@@ -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
@@ -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

This file was deleted.

0 comments on commit b3f2e3b

Please sign in to comment.
You can’t perform that action at this time.