diff options
author | Rich Trott <rtrott@gmail.com> | 2019-05-24 10:16:16 -0700 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2019-05-28 07:33:30 +0200 |
commit | b54f3e040506888934700a98a81cb88da90ecf27 (patch) | |
tree | 37a28162d3f1e611909ee3458936f02ab1ff269f /.eslintrc.js | |
parent | 144db48b6d2e2372bb14fee843f515fc97e49c31 (diff) | |
download | android-node-v8-b54f3e040506888934700a98a81cb88da90ecf27.tar.gz android-node-v8-b54f3e040506888934700a98a81cb88da90ecf27.tar.bz2 android-node-v8-b54f3e040506888934700a98a81cb88da90ecf27.zip |
tools: edit .eslintrc.js for minor maintainability improvements
* Add a comment explaining the Module._findPath() hacks so that someone
else doesn't do what I do and try to remove them because they seem
unnecessary for `make lint` and friends.
* Add a trailing comma for consistency with the rest of the file.
PR-URL: https://github.com/nodejs/node/pull/27789
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 55b61cea63..32c8574180 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,6 +8,10 @@ const path = require('path'); const NodePlugin = require('./tools/node_modules/eslint-plugin-node-core'); NodePlugin.RULES_DIR = path.resolve(__dirname, 'tools', 'eslint-rules'); +// The Module._findPath() monkeypatching is to make it so that ESLint will work +// if invoked by a globally-installed ESLint or ESLint installed elsewhere +// rather than the one we ship. This makes it possible for IDEs to lint files +// with our rules while people edit them. const ModuleFindPath = Module._findPath; const hacks = [ 'eslint-plugin-node-core', @@ -236,7 +240,7 @@ module.exports = { { selector: "CallExpression[callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])", message: 'The first argument should be the `actual`, not the `expected` value.', - } + }, ], /* eslint-enable max-len */ 'no-return-await': 'error', |