Skip to content

Commit

Permalink
lib: remove excess indentation
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Trott authored and MylesBorins committed Sep 5, 2017
1 parent f20ed49 commit 4dabeee
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion lib/_tls_legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Object.defineProperty(CryptoStream.prototype, 'bytesWritten', {
CryptoStream.prototype.getPeerCertificate = function(detailed) {
if (this.pair.ssl) {
return common.translatePeerCertificate(
this.pair.ssl.getPeerCertificate(detailed));
this.pair.ssl.getPeerCertificate(detailed));
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ TLSSocket.prototype.setSession = function(session) {
TLSSocket.prototype.getPeerCertificate = function(detailed) {
if (this._handle) {
return common.translatePeerCertificate(
this._handle.getPeerCertificate(detailed));
this._handle.getPeerCertificate(detailed));
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ function slowIndexOf(buffer, val, byteOffset, encoding, dir) {
case 'ascii':
case 'hex':
return binding.indexOfBuffer(
buffer, Buffer.from(val, encoding), byteOffset, encoding, dir);
buffer, Buffer.from(val, encoding), byteOffset, encoding, dir);

default:
if (loweredCase) {
Expand Down
29 changes: 15 additions & 14 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,21 @@ function isFd(path) {

// Static method to set the stats properties on a Stats object.
function Stats(
dev,
mode,
nlink,
uid,
gid,
rdev,
blksize,
ino,
size,
blocks,
atim_msec,
mtim_msec,
ctim_msec,
birthtim_msec) {
dev,
mode,
nlink,
uid,
gid,
rdev,
blksize,
ino,
size,
blocks,
atim_msec,
mtim_msec,
ctim_msec,
birthtim_msec
) {
this.dev = dev;
this.mode = mode;
this.nlink = nlink;
Expand Down
6 changes: 3 additions & 3 deletions lib/internal/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,11 @@ ChildProcess.prototype.spawn = function(options) {
}

this.stdin = stdio.length >= 1 && stdio[0].socket !== undefined ?
stdio[0].socket : null;
stdio[0].socket : null;
this.stdout = stdio.length >= 2 && stdio[1].socket !== undefined ?
stdio[1].socket : null;
stdio[1].socket : null;
this.stderr = stdio.length >= 3 && stdio[2].socket !== undefined ?
stdio[2].socket : null;
stdio[2].socket : null;

this.stdio = stdio.map(function(stdio) {
return stdio.socket === undefined ? null : stdio.socket;
Expand Down
8 changes: 4 additions & 4 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,12 @@ Interface.prototype._moveCursor = function(dx) {
var diffWidth;
if (diffCursor < 0) {
diffWidth = -getStringWidth(
this.line.substring(this.cursor, oldcursor)
);
this.line.substring(this.cursor, oldcursor)
);
} else if (diffCursor > 0) {
diffWidth = getStringWidth(
this.line.substring(this.cursor, oldcursor)
);
this.line.substring(this.cursor, oldcursor)
);
}
exports.moveCursor(this.output, diffWidth, 0);
this.prevRows = newPos.rows;
Expand Down
2 changes: 1 addition & 1 deletion lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) {

if (!valid) {
const err = new Error(
`Hostname/IP doesn't match certificate's altnames: "${reason}"`);
`Hostname/IP doesn't match certificate's altnames: "${reason}"`);
err.reason = reason;
err.host = host;
err.cert = cert;
Expand Down
7 changes: 3 additions & 4 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,7 @@ Url.prototype.resolveObject = function(relative) {

var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/');
var isRelAbs = (
relative.host ||
relative.pathname && relative.pathname.charAt(0) === '/'
relative.host || relative.pathname && relative.pathname.charAt(0) === '/'
);
var mustEndAbs = (isRelAbs || isSourceAbs ||
(result.host && relative.pathname));
Expand Down Expand Up @@ -843,8 +842,8 @@ Url.prototype.resolveObject = function(relative) {
// then it must NOT get a trailing slash.
var last = srcPath.slice(-1)[0];
var hasTrailingSlash = (
(result.host || relative.host || srcPath.length > 1) &&
(last === '.' || last === '..') || last === '');
(result.host || relative.host || srcPath.length > 1) &&
(last === '.' || last === '..') || last === '');

// strip single dots, resolve double dots to parent dir
// if the path tries to go above the root, `up` ends up > 0
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ function formatTypedArray(ctx, value, recurseTimes, visibleKeys, keys) {
for (const key of keys) {
if (typeof key === 'symbol' || !numbersOnlyRE.test(key)) {
output.push(
formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
}
}
return output;
Expand Down

0 comments on commit 4dabeee

Please sign in to comment.