Skip to content

Commit 43fc451

Browse files
committed
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.
1 parent c3b8f5a commit 43fc451

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)