lib: enable dot-notation eslint rule

PR-URL: https://github.com/nodejs/node/pull/18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
This commit is contained in:
Anatoli Papirovski 2018-01-05 11:42:39 -05:00
parent fbad8bb1fa
commit f3f3f8890c
No known key found for this signature in database
GPG Key ID: 614E2E1ABEB4B2C0
3 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
rules:
dot-notation: error
# Custom rules in tools/eslint-rules
require-buffer: error
buffer-constructor: error

View File

@ -68,7 +68,7 @@ class Session extends EventEmitter {
const id = this[nextIdSymbol]++;
const message = { id, method };
if (params) {
message['params'] = params;
message.params = params;
}
if (callback) {
this[messageCallbacksSymbol].set(id, callback);

View File

@ -729,7 +729,7 @@ Module._initPaths = function() {
paths.unshift(path.resolve(homeDir, '.node_modules'));
}
var nodePath = process.env['NODE_PATH'];
var nodePath = process.env.NODE_PATH;
if (nodePath) {
paths = nodePath.split(path.delimiter).filter(function(path) {
return !!path;