From a76922de224a53e994121bfb379f35a557d62adf Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Fri, 5 Jan 2018 11:42:39 -0500 Subject: [PATCH] lib: enable dot-notation eslint rule --- lib/.eslintrc.yaml | 2 ++ lib/inspector.js | 2 +- lib/module.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index aaebadca125814..437aa575645ad6 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -1,4 +1,6 @@ rules: + dot-notation: error + # Custom rules in tools/eslint-rules require-buffer: error buffer-constructor: error diff --git a/lib/inspector.js b/lib/inspector.js index 091e0e5fc9b0b1..5206024f7b9fe7 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -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); diff --git a/lib/module.js b/lib/module.js index 4c4ceaf847fba2..4e41422b58510d 100644 --- a/lib/module.js +++ b/lib/module.js @@ -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;