Skip to content

Commit d11840c

Browse files
Trottaddaleax
authored andcommitted
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. Backport-PR-URL: #14520 Backport-Reviewed-By: Anna Henningsen <[email protected]> PR-URL: #14403 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]>
1 parent 9e5a088 commit d11840c

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.eslintrc.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,17 @@ rules:
102102
func-name-matching: error
103103
func-style: [error, declaration, {allowArrowFunctions: true}]
104104
# indent: [error, 2, {ArrayExpression: first,
105-
# CallExpression: {arguments: first},
106-
# FunctionDeclaration: {parameters: first},
107-
# FunctionExpression: {parameters: first},
108-
# MemberExpression: off,
109-
# ObjectExpression: first,
110-
# SwitchCase: 1}]
105+
# CallExpression: {arguments: first},
106+
# FunctionDeclaration: {parameters: first},
107+
# FunctionExpression: {parameters: first},
108+
# MemberExpression: off,
109+
# ObjectExpression: first,
110+
# SwitchCase: 1}]
111111
indent-legacy: [error, 2, {ArrayExpression: first,
112-
CallExpression: {arguments: first},
113-
MemberExpression: 1,
114-
ObjectExpression: first,
115-
SwitchCase: 1}]
112+
CallExpression: {arguments: first},
113+
MemberExpression: 1,
114+
ObjectExpression: first,
115+
SwitchCase: 1}]
116116
key-spacing: [error, {mode: minimum}]
117117
keyword-spacing: error
118118
linebreak-style: [error, unix]

lib/.eslintrc.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
rules:
2+
indent: [error, 2, {ArrayExpression: first,
3+
CallExpression: {arguments: first},
4+
FunctionDeclaration: {parameters: first},
5+
FunctionExpression: {parameters: first},
6+
MemberExpression: off,
7+
ObjectExpression: first,
8+
SwitchCase: 1}]
9+
indent-legacy: 0
10+
211
# Custom rules in tools/eslint-rules
312
require-buffer: error
413
buffer-constructor: error

0 commit comments

Comments
 (0)