summaryrefslogtreecommitdiff
path: root/.eslintrc.yaml
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-04-08 19:43:59 -0700
committerRich Trott <rtrott@gmail.com>2017-04-12 13:07:39 -0700
commitb3f2e3b7e2793e1f74cd296e85a549d926054225 (patch)
tree80bdf2a4a00cd9f38679dd77bac1ab9a23a453fa /.eslintrc.yaml
parent0ec0272e107e26c9740f33baade3cbe10a321fa3 (diff)
downloadnode-new-b3f2e3b7e2793e1f74cd296e85a549d926054225.tar.gz
tools: replace custom assert.fail lint rule
Replace custom lint rule for `assert.fail()` function signature errors with a restricted-syntax rule. PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to '.eslintrc.yaml')
-rw-r--r--.eslintrc.yaml4
1 files changed, 3 insertions, 1 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index 07ef483c3f..9190475e9b 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -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