Skip to content

Commit 969c39e

Browse files
apapirovskiMylesBorins
authored andcommitted
lib: enable dot-notation eslint rule
PR-URL: #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>
1 parent 4879038 commit 969c39e

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
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/_debugger.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,9 @@ function Interface(stdin, stdout, args) {
742742
useGlobal: false,
743743
ignoreUndefined: true
744744
};
745-
if (parseInt(process.env['NODE_NO_READLINE'], 10)) {
745+
if (parseInt(process.env.NODE_NO_READLINE, 10)) {
746746
opts.terminal = false;
747-
} else if (parseInt(process.env['NODE_FORCE_READLINE'], 10)) {
747+
} else if (parseInt(process.env.NODE_FORCE_READLINE, 10)) {
748748
opts.terminal = true;
749749

750750
// Emulate Ctrl+C if we're emulating terminal
@@ -754,7 +754,7 @@ function Interface(stdin, stdout, args) {
754754
});
755755
}
756756
}
757-
if (parseInt(process.env['NODE_DISABLE_COLORS'], 10)) {
757+
if (parseInt(process.env.NODE_DISABLE_COLORS, 10)) {
758758
opts.useColors = false;
759759
}
760760

lib/internal/child_process.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ ChildProcess.prototype.kill = function(sig) {
383383
if (sig === 0) {
384384
signal = 0;
385385
} else if (!sig) {
386-
signal = constants['SIGTERM'];
386+
signal = constants.SIGTERM;
387387
} else {
388388
signal = constants[sig];
389389
}

lib/module.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ Module._initPaths = function() {
639639
paths.unshift(path.resolve(homeDir, '.node_modules'));
640640
}
641641

642-
var nodePath = process.env['NODE_PATH'];
642+
var nodePath = process.env.NODE_PATH;
643643
if (nodePath) {
644644
paths = nodePath.split(path.delimiter).filter(function(path) {
645645
return !!path;

0 commit comments

Comments
 (0)