diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 5e025301fe8a62..0ba050d4c60628 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -102,17 +102,17 @@ rules: func-name-matching: error func-style: [error, declaration, {allowArrowFunctions: true}] # indent: [error, 2, {ArrayExpression: first, - # CallExpression: {arguments: first}, - # FunctionDeclaration: {parameters: first}, - # FunctionExpression: {parameters: first}, - # MemberExpression: off, - # ObjectExpression: first, - # SwitchCase: 1}] + # CallExpression: {arguments: first}, + # FunctionDeclaration: {parameters: first}, + # FunctionExpression: {parameters: first}, + # MemberExpression: off, + # ObjectExpression: first, + # SwitchCase: 1}] indent-legacy: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - MemberExpression: 1, - ObjectExpression: first, - SwitchCase: 1}] + CallExpression: {arguments: first}, + MemberExpression: 1, + ObjectExpression: first, + SwitchCase: 1}] key-spacing: [error, {mode: minimum}] keyword-spacing: error linebreak-style: [error, unix] diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 24f54e682636ee..1015a5fd25f003 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -1,4 +1,13 @@ rules: + indent: [error, 2, {ArrayExpression: first, + CallExpression: {arguments: first}, + FunctionDeclaration: {parameters: first}, + FunctionExpression: {parameters: first}, + MemberExpression: off, + ObjectExpression: first, + SwitchCase: 1}] + indent-legacy: 0 + # Custom rules in tools/eslint-rules require-buffer: error buffer-constructor: error diff --git a/lib/net.js b/lib/net.js index a22754eb302c24..3d7122765bf358 100644 --- a/lib/net.js +++ b/lib/net.js @@ -988,9 +988,9 @@ Socket.prototype.connect = function() { if (pipe) { if (typeof path !== 'string') { throw new errors.TypeError('ERR_INVALID_ARG_TYPE', - 'options.path', - 'string', - path); + 'options.path', + 'string', + path); } internalConnect(this, path); } else { diff --git a/lib/repl.js b/lib/repl.js index 4efe02e94e9c44..059af8d3f9ac4a 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1058,7 +1058,9 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) { cmd = {action: cmd}; } else if (typeof cmd.action !== 'function') { throw new errors.TypeError('ERR_INVALID_ARG_TYPE', - 'action', 'function', cmd.action); + 'action', + 'function', + cmd.action); } this.commands[keyword] = cmd; };