tools: enable stricter linting in lib directory
Enable ESLint 4.x linting and disable legacy linting in the lib directory. While doing this, some indentation in the .eslintrc.yaml file itself was noticed to be incorrect. Fixed that too. PR-URL: https://github.com/nodejs/node/pull/14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
This commit is contained in:
parent
8cccdd96f5
commit
7f5a745e35
@ -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]
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user