Skip to content

Commit b817a8a

Browse files
apapirovskiMylesBorins
authored andcommitted
lib: enable dot-notation eslint rule
PR-URL: #18007 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Jon Moss <[email protected]>
1 parent 4dacff7 commit b817a8a

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

lib/.eslintrc.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rules:
2+
dot-notation: error
3+
24
# Custom rules in tools/eslint-rules
35
require-buffer: error
46
buffer-constructor: error

lib/inspector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Session extends EventEmitter {
6868
const id = this[nextIdSymbol]++;
6969
const message = { id, method };
7070
if (params) {
71-
message['params'] = params;
71+
message.params = params;
7272
}
7373
if (callback) {
7474
this[messageCallbacksSymbol].set(id, callback);

lib/internal/util.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const { signals } = process.binding('constants').os;
66

77
const { createPromise, promiseResolve, promiseReject } = binding;
88

9-
const kArrowMessagePrivateSymbolIndex = binding['arrow_message_private_symbol'];
10-
const kDecoratedPrivateSymbolIndex = binding['decorated_private_symbol'];
9+
const kArrowMessagePrivateSymbolIndex = binding.arrow_message_private_symbol;
10+
const kDecoratedPrivateSymbolIndex = binding.decorated_private_symbol;
1111
const noCrypto = !process.versions.openssl;
1212

1313
const experimentalWarnings = new Set();

lib/module.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ Module._initPaths = function() {
729729
paths.unshift(path.resolve(homeDir, '.node_modules'));
730730
}
731731

732-
var nodePath = process.env['NODE_PATH'];
732+
var nodePath = process.env.NODE_PATH;
733733
if (nodePath) {
734734
paths = nodePath.split(path.delimiter).filter(function(path) {
735735
return !!path;

0 commit comments

Comments
 (0)