summaryrefslogtreecommitdiff
path: root/.eslintrc.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-02-22 12:50:50 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-22 14:06:04 +0000
commit13637d23f7a2667c2f9abfe2c1a44d6941e10681 (patch)
treee210c6b46bc99968703953e45c52db441dbb1316 /.eslintrc.js
parent95bae858094450bd01f858ddd358ae0f83865157 (diff)
downloadnode-new-13637d23f7a2667c2f9abfe2c1a44d6941e10681.tar.gz
tools: add falsely removed eslint rules
This adds the eslint rules back in that were falsely removed while landing https://github.com/nodejs/node/pull/18566. PR-URL: https://github.com/nodejs/node/pull/18933 Refs: https://github.com/nodejs/node/pull/18566 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index 7b8a2cc833..cd5fc51e8e 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -71,6 +71,7 @@ module.exports = {
'accessor-pairs': 'error',
'array-callback-return': 'error',
'dot-location': ['error', 'property'],
+ 'dot-notation': 'error',
eqeqeq: ['error', 'smart'],
'no-fallthrough': 'error',
'no-global-assign': 'error',
@@ -111,6 +112,7 @@ module.exports = {
],
'no-return-await': 'error',
'no-self-assign': 'error',
+ 'no-self-compare': 'error',
'no-throw-literal': 'error',
'no-unused-labels': 'error',
'no-useless-call': 'error',
@@ -181,6 +183,10 @@ module.exports = {
'no-restricted-syntax': [
'error',
{
+ selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
+ message: "Please replace `assert.doesNotThrow()` and add a comment next to the code instead."
+ },
+ {
selector: `CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])`,
message: 'use a regular expression for second argument of assert.throws()',
},
@@ -204,6 +210,7 @@ module.exports = {
/* eslint-enable max-len, quotes */
'no-tabs': 'error',
'no-trailing-spaces': 'error',
+ 'no-unsafe-finally': 'error',
'object-curly-spacing': ['error', 'always'],
'one-var-declaration-per-line': 'error',
'operator-linebreak': ['error', 'after'],