summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-08-14 23:40:18 -0700
committerMyles Borins <mylesborins@google.com>2017-09-05 12:49:50 -0400
commit62de339327d2a388cdcf38e63786b74acf2950e0 (patch)
treec59d3e0fc8963ed712caa08aadf0604a79f0c507 /lib
parenta3cd733deae805650d96f23326de24ad446d1e1b (diff)
downloadnode-new-62de339327d2a388cdcf38e63786b74acf2950e0.tar.gz
tools: remove legacy indentation linting
All linting now uses the current ESLint 4.3.0 indentation linting. Remove legacy indentation rules. Backport-PR-URL: https://github.com/nodejs/node/pull/14835 PR-URL: https://github.com/nodejs/node/pull/14515 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/_debugger.js2
-rw-r--r--lib/_stream_readable.js4
-rw-r--r--lib/child_process.js10
-rw-r--r--lib/fs.js2
-rw-r--r--lib/internal/child_process.js2
-rw-r--r--lib/internal/freelist.js2
-rw-r--r--lib/internal/readline.js2
-rw-r--r--lib/internal/repl.js6
-rw-r--r--lib/readline.js4
-rw-r--r--lib/url.js4
10 files changed, 19 insertions, 19 deletions
diff --git a/lib/_debugger.js b/lib/_debugger.js
index 1d5345cde4..64a8b70c5e 100644
--- a/lib/_debugger.js
+++ b/lib/_debugger.js
@@ -1206,7 +1206,7 @@ Interface.prototype.scripts = function() {
script.name === client.currentScript ||
!script.isNative) {
scripts.push(
- (script.name === client.currentScript ? '* ' : ' ') +
+ (script.name === client.currentScript ? '* ' : ' ') +
id + ': ' +
path.basename(script.name)
);
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
index fc6252edf4..541ef1c305 100644
--- a/lib/_stream_readable.js
+++ b/lib/_stream_readable.js
@@ -877,8 +877,8 @@ function fromListPartial(n, list, hasStrings) {
} else {
// result spans more than one buffer
ret = (hasStrings
- ? copyFromBufferString(n, list)
- : copyFromBuffer(n, list));
+ ? copyFromBufferString(n, list)
+ : copyFromBuffer(n, list));
}
return ret;
}
diff --git a/lib/child_process.js b/lib/child_process.js
index 0e1d8f2986..e0e81c8dec 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -48,7 +48,7 @@ exports.fork = function(modulePath /*, args, options*/) {
// Use a separate fd=3 for the IPC channel. Inherit stdin, stdout,
// and stderr from the parent if silent isn't set.
options.stdio = options.silent ? ['pipe', 'pipe', 'pipe', 'ipc'] :
- [0, 1, 2, 'ipc'];
+ [0, 1, 2, 'ipc'];
} else if (options.stdio.indexOf('ipc') === -1) {
throw new TypeError('Forked processes must have an IPC channel');
}
@@ -321,7 +321,7 @@ function normalizeSpawnArguments(file, args, options) {
if (process.platform === 'win32') {
file = typeof options.shell === 'string' ? options.shell :
- process.env.comspec || 'cmd.exe';
+ process.env.comspec || 'cmd.exe';
args = ['/s', '/c', '"' + command + '"'];
options.windowsVerbatimArguments = true;
} else {
@@ -427,9 +427,9 @@ function spawnSync(/*file, args, options*/) {
pipe.input = Buffer.from(input, options.encoding);
else
throw new TypeError(util.format(
- 'stdio[%d] should be Buffer or string not %s',
- i,
- typeof input));
+ 'stdio[%d] should be Buffer or string not %s',
+ i,
+ typeof input));
}
}
diff --git a/lib/fs.js b/lib/fs.js
index ca95d9d0ba..10e960504a 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -1325,7 +1325,7 @@ fs.writeFile = function(path, data, options, callback_) {
function writeFd(fd, isUserFd) {
var buffer = (data instanceof Buffer) ?
- data : Buffer.from('' + data, options.encoding || 'utf8');
+ data : Buffer.from('' + data, options.encoding || 'utf8');
var position = /a/.test(flag) ? null : 0;
writeAll(fd, isUserFd, buffer, 0, buffer.length, position, callback);
diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js
index 36675b225e..764cdd3cf2 100644
--- a/lib/internal/child_process.js
+++ b/lib/internal/child_process.js
@@ -343,7 +343,7 @@ ChildProcess.prototype.spawn = function(options) {
// when i === 0 - we're dealing with stdin
// (which is the only one writable pipe)
stream.socket = createSocket(self.pid !== 0 ?
- stream.handle : null, i > 0);
+ stream.handle : null, i > 0);
if (i > 0 && self.pid !== 0) {
self._closesNeeded++;
diff --git a/lib/internal/freelist.js b/lib/internal/freelist.js
index 90f5483724..e59821cefd 100644
--- a/lib/internal/freelist.js
+++ b/lib/internal/freelist.js
@@ -10,7 +10,7 @@ exports.FreeList = function(name, max, constructor) {
exports.FreeList.prototype.alloc = function() {
return this.list.length ? this.list.pop() :
- this.constructor.apply(this, arguments);
+ this.constructor.apply(this, arguments);
};
diff --git a/lib/internal/readline.js b/lib/internal/readline.js
index dbe8775dba..00ac41ee76 100644
--- a/lib/internal/readline.js
+++ b/lib/internal/readline.js
@@ -56,7 +56,7 @@ function isFullWidthCodePoint(code) {
// Code points are derived from:
// http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
if (code >= 0x1100 && (
- code <= 0x115f || // Hangul Jamo
+ code <= 0x115f || // Hangul Jamo
0x2329 === code || // LEFT-POINTING ANGLE BRACKET
0x232a === code || // RIGHT-POINTING ANGLE BRACKET
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
diff --git a/lib/internal/repl.js b/lib/internal/repl.js
index b4167cc56a..ca4016cee3 100644
--- a/lib/internal/repl.js
+++ b/lib/internal/repl.js
@@ -134,14 +134,14 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) {
// If pre-v3.0, the user had set NODE_REPL_HISTORY_FILE to
// ~/.node_repl_history, warn the user about it and proceed.
repl._writeToOutput(
- '\nThe old repl history file has the same name and location as ' +
+ '\nThe old repl history file has the same name and location as ' +
`the new one i.e., ${historyPath} and is empty.\nUsing it as is.\n`);
repl._refreshLine();
} else if (oldHistoryPath) {
// Grab data from the older pre-v3.0 JSON NODE_REPL_HISTORY_FILE format.
repl._writeToOutput(
- '\nConverting old JSON repl history to line-separated history.\n' +
+ '\nConverting old JSON repl history to line-separated history.\n' +
`The new repl history file can be found at ${historyPath}.\n`);
repl._refreshLine();
@@ -225,7 +225,7 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) {
function _replHistoryMessage() {
if (this.history.length === 0) {
this._writeToOutput(
- '\nPersistent history support disabled. ' +
+ '\nPersistent history support disabled. ' +
'Set the NODE_REPL_HISTORY environment\nvariable to ' +
'a valid, user-writable path to enable.\n'
);
diff --git a/lib/readline.js b/lib/readline.js
index 05a30f1ece..c167db6eb1 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -1127,5 +1127,5 @@ exports.isFullWidthCodePoint = internalUtil.deprecate(
exports.stripVTControlCharacters = internalUtil.deprecate(
- stripVTControlCharacters,
- 'stripVTControlCharacters is deprecated and will be removed.');
+ stripVTControlCharacters,
+ 'stripVTControlCharacters is deprecated and will be removed.');
diff --git a/lib/url.js b/lib/url.js
index ad5e715f06..cb2a17146d 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -371,8 +371,8 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
var firstIdx = (questionIdx !== -1 &&
(hashIdx === -1 || questionIdx < hashIdx)
- ? questionIdx
- : hashIdx);
+ ? questionIdx
+ : hashIdx);
if (firstIdx === -1) {
if (rest.length > 0)
this.pathname = rest;