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 <anna@addaleax.net> PR-URL: #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>
1 parent 9e5a088 commit d11840c

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.eslintrc.yaml

Lines changed: 10 additions & 10 deletions
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

Lines changed: 9 additions & 0 deletions
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)