Skip to content

Commit ecb2436

Browse files
silverwindFishrock123
authored andcommitted
tools: set eslint comma-spacing to 'warn'
Certain cases with comments inside arrays or object literals fail to pass eslint's comma-spacing rule. This change sets the comma-spacing rule to the 'warn' level. Once eslint/eslint#2408 is resolved and released, this rule should be set back to 'error' level. PR-URL: nodejs#1672 Reviewed-By: Yosuke Furukawa <[email protected]>
1 parent 82a5dab commit ecb2436

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.eslintrc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ rules:
4545
- 2
4646
- 2
4747
## add space after comma
48-
comma-spacing: 2
48+
## set to 'warn' because of https://github.com/eslint/eslint/issues/2408
49+
comma-spacing: 1
4950
## put semi-colon
5051
semi: 2
5152
## require spaces operator like var sum = 1 + 1;
@@ -55,21 +56,20 @@ rules:
5556
## require parens for Constructor
5657
new-parens: 2
5758
## max 80 length
58-
max-len:
59+
max-len:
5960
- 2
6061
- 80
6162
- 2
6263

63-
6464
# Strict Mode
6565
# list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
6666
## 'use strict' on top
67-
strict:
67+
strict:
6868
- 2
6969
- "global"
7070

7171
# Global scoped method and vars
72-
globals:
72+
globals:
7373
DTRACE_HTTP_CLIENT_REQUEST: true
7474
LTTNG_HTTP_CLIENT_REQUEST: true
7575
COUNTER_HTTP_CLIENT_REQUEST: true
@@ -88,4 +88,3 @@ globals:
8888
DTRACE_NET_SERVER_CONNECTION: true
8989
LTTNG_NET_SERVER_CONNECTION: true
9090
COUNTER_NET_SERVER_CONNECTION: true
91-

0 commit comments

Comments
 (0)