Skip to content

Commit 4dabeee

Browse files
TrottMylesBorins
authored andcommitted
lib: remove excess indentation
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. Backport-PR-URL: #14835 PR-URL: #14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent f20ed49 commit 4dabeee

9 files changed

+30
-30
lines changed

lib/_tls_legacy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Object.defineProperty(CryptoStream.prototype, 'bytesWritten', {
361361
CryptoStream.prototype.getPeerCertificate = function(detailed) {
362362
if (this.pair.ssl) {
363363
return common.translatePeerCertificate(
364-
this.pair.ssl.getPeerCertificate(detailed));
364+
this.pair.ssl.getPeerCertificate(detailed));
365365
}
366366

367367
return null;

lib/_tls_wrap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ TLSSocket.prototype.setSession = function(session) {
641641
TLSSocket.prototype.getPeerCertificate = function(detailed) {
642642
if (this._handle) {
643643
return common.translatePeerCertificate(
644-
this._handle.getPeerCertificate(detailed));
644+
this._handle.getPeerCertificate(detailed));
645645
}
646646

647647
return null;

lib/buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ function slowIndexOf(buffer, val, byteOffset, encoding, dir) {
626626
case 'ascii':
627627
case 'hex':
628628
return binding.indexOfBuffer(
629-
buffer, Buffer.from(val, encoding), byteOffset, encoding, dir);
629+
buffer, Buffer.from(val, encoding), byteOffset, encoding, dir);
630630

631631
default:
632632
if (loweredCase) {

lib/fs.js

+15-14
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,21 @@ function isFd(path) {
148148

149149
// Static method to set the stats properties on a Stats object.
150150
function Stats(
151-
dev,
152-
mode,
153-
nlink,
154-
uid,
155-
gid,
156-
rdev,
157-
blksize,
158-
ino,
159-
size,
160-
blocks,
161-
atim_msec,
162-
mtim_msec,
163-
ctim_msec,
164-
birthtim_msec) {
151+
dev,
152+
mode,
153+
nlink,
154+
uid,
155+
gid,
156+
rdev,
157+
blksize,
158+
ino,
159+
size,
160+
blocks,
161+
atim_msec,
162+
mtim_msec,
163+
ctim_msec,
164+
birthtim_msec
165+
) {
165166
this.dev = dev;
166167
this.mode = mode;
167168
this.nlink = nlink;

lib/internal/child_process.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,11 @@ ChildProcess.prototype.spawn = function(options) {
355355
}
356356

357357
this.stdin = stdio.length >= 1 && stdio[0].socket !== undefined ?
358-
stdio[0].socket : null;
358+
stdio[0].socket : null;
359359
this.stdout = stdio.length >= 2 && stdio[1].socket !== undefined ?
360-
stdio[1].socket : null;
360+
stdio[1].socket : null;
361361
this.stderr = stdio.length >= 3 && stdio[2].socket !== undefined ?
362-
stdio[2].socket : null;
362+
stdio[2].socket : null;
363363

364364
this.stdio = stdio.map(function(stdio) {
365365
return stdio.socket === undefined ? null : stdio.socket;

lib/readline.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -683,12 +683,12 @@ Interface.prototype._moveCursor = function(dx) {
683683
var diffWidth;
684684
if (diffCursor < 0) {
685685
diffWidth = -getStringWidth(
686-
this.line.substring(this.cursor, oldcursor)
687-
);
686+
this.line.substring(this.cursor, oldcursor)
687+
);
688688
} else if (diffCursor > 0) {
689689
diffWidth = getStringWidth(
690-
this.line.substring(this.cursor, oldcursor)
691-
);
690+
this.line.substring(this.cursor, oldcursor)
691+
);
692692
}
693693
exports.moveCursor(this.output, diffWidth, 0);
694694
this.prevRows = newPos.rows;

lib/tls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) {
197197

198198
if (!valid) {
199199
const err = new Error(
200-
`Hostname/IP doesn't match certificate's altnames: "${reason}"`);
200+
`Hostname/IP doesn't match certificate's altnames: "${reason}"`);
201201
err.reason = reason;
202202
err.host = host;
203203
err.cert = cert;

lib/url.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,7 @@ Url.prototype.resolveObject = function(relative) {
738738

739739
var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/');
740740
var isRelAbs = (
741-
relative.host ||
742-
relative.pathname && relative.pathname.charAt(0) === '/'
741+
relative.host || relative.pathname && relative.pathname.charAt(0) === '/'
743742
);
744743
var mustEndAbs = (isRelAbs || isSourceAbs ||
745744
(result.host && relative.pathname));
@@ -843,8 +842,8 @@ Url.prototype.resolveObject = function(relative) {
843842
// then it must NOT get a trailing slash.
844843
var last = srcPath.slice(-1)[0];
845844
var hasTrailingSlash = (
846-
(result.host || relative.host || srcPath.length > 1) &&
847-
(last === '.' || last === '..') || last === '');
845+
(result.host || relative.host || srcPath.length > 1) &&
846+
(last === '.' || last === '..') || last === '');
848847

849848
// strip single dots, resolve double dots to parent dir
850849
// if the path tries to go above the root, `up` ends up > 0

lib/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ function formatTypedArray(ctx, value, recurseTimes, visibleKeys, keys) {
691691
for (const key of keys) {
692692
if (typeof key === 'symbol' || !numbersOnlyRE.test(key)) {
693693
output.push(
694-
formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
694+
formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
695695
}
696696
}
697697
return output;

0 commit comments

Comments
 (0)