Skip to content

Commit e3e9dbd

Browse files
committed
Breaking: Create eslint:recommended and add to --init (fixes #2713)
1 parent 939cf46 commit e3e9dbd

File tree

10 files changed

+201
-131
lines changed

10 files changed

+201
-131
lines changed

.eslintrc

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,89 @@ env:
44
node: true
55

66
extends:
7-
"./conf/eslint.json"
7+
"eslint:recommended"
88

99
rules:
1010
indent: [2, 4, {indentSwitchCase: true}]
1111
brace-style: [2, "1tbs"]
1212
camelcase: [2, { properties: "never" }]
1313
callback-return: [2, ["cb", "callback", "next"]]
14+
comma-spacing: 2
1415
comma-style: [2, "last"]
16+
consistent-return: 2
17+
curly: [2, "all"]
1518
default-case: 2
19+
dot-notation: [2, { allowKeywords: true }]
20+
eol-last: 2
21+
eqeqeq: 2
1622
func-style: [2, "declaration"]
1723
guard-for-in: 2
24+
key-spacing: [2, { beforeColon: false, afterColon: true }]
25+
new-cap: 2
26+
new-parens: 2
27+
no-alert: 2
28+
no-array-constructor: 2
29+
no-caller: 2
30+
no-console: 0
31+
no-delete-var: 2
32+
no-empty-label: 2
33+
no-eval: 2
34+
no-extend-native: 2
35+
no-extra-bind: 2
36+
no-extra-strict: 2
37+
no-fallthrough: 2
1838
no-floating-decimal: 2
39+
no-implied-eval: 2
40+
no-iterator: 2
41+
no-label-var: 2
42+
no-labels: 2
43+
no-lone-blocks: 2
44+
no-loop-func: 2
45+
no-mixed-spaces-and-tabs: [2, false]
46+
no-multi-spaces: 2
47+
no-multi-str: 2
48+
no-native-reassign: 2
1949
no-nested-ternary: 2
50+
no-new: 2
51+
no-new-func: 2
52+
no-new-object: 2
53+
no-new-wrappers: 2
54+
no-octal: 2
55+
no-octal-escape: 2
56+
no-process-exit: 2
57+
no-proto: 2
58+
no-redeclare: 2
59+
no-return-assign: 2
60+
no-script-url: 2
61+
no-sequences: 2
62+
no-shadow: 2
63+
no-shadow-restricted-names: 2
64+
no-spaced-func: 2
65+
no-trailing-spaces: 2
66+
no-undef: 2
67+
no-undef-init: 2
2068
no-undefined: 2
69+
no-underscore-dangle: 2
70+
no-unused-expressions: 2
71+
no-unused-vars: [2, {vars: "all", args: "after-used"}]
72+
no-use-before-define: 2
73+
no-with: 2
74+
no-wrap-func: 2
75+
quotes: [2, "double"]
2176
radix: 2
77+
semi: 2
78+
semi-spacing: [2, {before: false, after: true}]
2279
space-after-function-name: [2, "never"]
2380
space-after-keywords: [2, "always"]
2481
space-before-blocks: 2
82+
space-infix-ops: 2
83+
space-return-throw-case: 2
84+
space-unary-ops: [2, {words: true, nonwords: false}]
2585
spaced-line-comment: [2, "always", { exceptions: ["-"]}]
2686
strict: [2, "global"]
2787
valid-jsdoc: [2, { prefer: { "return": "returns"}}]
2888
wrap-iife: 2
89+
yoda: [2, "never"]
2990

3091
# Previously on by default in node environment
3192
no-catch-shadow: 0

conf/eslint.json

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"ecmaFeatures": {},
33
"rules": {
4-
"no-alert": 2,
5-
"no-array-constructor": 2,
4+
"no-alert": 0,
5+
"no-array-constructor": 0,
66
"no-bitwise": 0,
7-
"no-caller": 2,
8-
"no-catch-shadow": 2,
7+
"no-caller": 0,
8+
"no-catch-shadow": 0,
99
"no-cond-assign": 2,
1010
"no-console": 2,
1111
"no-constant-condition": 2,
@@ -21,87 +21,87 @@
2121
"no-empty": 2,
2222
"no-empty-class": 0,
2323
"no-empty-character-class": 2,
24-
"no-empty-label": 2,
24+
"no-empty-label": 0,
2525
"no-eq-null": 0,
26-
"no-eval": 2,
26+
"no-eval": 0,
2727
"no-ex-assign": 2,
28-
"no-extend-native": 2,
29-
"no-extra-bind": 2,
28+
"no-extend-native": 0,
29+
"no-extra-bind": 0,
3030
"no-extra-boolean-cast": 2,
3131
"no-extra-parens": 0,
3232
"no-extra-semi": 2,
33-
"no-extra-strict": 2,
33+
"no-extra-strict": 0,
3434
"no-fallthrough": 2,
3535
"no-floating-decimal": 0,
3636
"no-func-assign": 2,
37-
"no-implied-eval": 2,
37+
"no-implied-eval": 0,
3838
"no-inline-comments": 0,
3939
"no-inner-declarations": [2, "functions"],
4040
"no-invalid-regexp": 2,
4141
"no-irregular-whitespace": 2,
42-
"no-iterator": 2,
43-
"no-label-var": 2,
44-
"no-labels": 2,
45-
"no-lone-blocks": 2,
42+
"no-iterator": 0,
43+
"no-label-var": 0,
44+
"no-labels": 0,
45+
"no-lone-blocks": 0,
4646
"no-lonely-if": 0,
47-
"no-loop-func": 2,
47+
"no-loop-func": 0,
4848
"no-mixed-requires": [0, false],
4949
"no-mixed-spaces-and-tabs": [2, false],
5050
"linebreak-style": [0, "unix"],
51-
"no-multi-spaces": 2,
52-
"no-multi-str": 2,
51+
"no-multi-spaces": 0,
52+
"no-multi-str": 0,
5353
"no-multiple-empty-lines": [0, {"max": 2}],
54-
"no-native-reassign": 2,
54+
"no-native-reassign": 0,
5555
"no-negated-in-lhs": 2,
5656
"no-nested-ternary": 0,
57-
"no-new": 2,
58-
"no-new-func": 2,
59-
"no-new-object": 2,
57+
"no-new": 0,
58+
"no-new-func": 0,
59+
"no-new-object": 0,
6060
"no-new-require": 0,
61-
"no-new-wrappers": 2,
61+
"no-new-wrappers": 0,
6262
"no-obj-calls": 2,
6363
"no-octal": 2,
64-
"no-octal-escape": 2,
64+
"no-octal-escape": 0,
6565
"no-param-reassign": 0,
6666
"no-path-concat": 0,
6767
"no-plusplus": 0,
6868
"no-process-env": 0,
69-
"no-process-exit": 2,
70-
"no-proto": 2,
69+
"no-process-exit": 0,
70+
"no-proto": 0,
7171
"no-redeclare": 2,
7272
"no-regex-spaces": 2,
7373
"no-reserved-keys": 0,
7474
"no-restricted-modules": 0,
75-
"no-return-assign": 2,
76-
"no-script-url": 2,
75+
"no-return-assign": 0,
76+
"no-script-url": 0,
7777
"no-self-compare": 0,
78-
"no-sequences": 2,
79-
"no-shadow": 2,
80-
"no-shadow-restricted-names": 2,
78+
"no-sequences": 0,
79+
"no-shadow": 0,
80+
"no-shadow-restricted-names": 0,
8181
"no-space-before-semi": 0,
82-
"no-spaced-func": 2,
82+
"no-spaced-func": 0,
8383
"no-sparse-arrays": 2,
8484
"no-sync": 0,
8585
"no-ternary": 0,
86-
"no-trailing-spaces": 2,
86+
"no-trailing-spaces": 0,
8787
"no-this-before-super": 0,
8888
"no-throw-literal": 0,
8989
"no-undef": 2,
90-
"no-undef-init": 2,
90+
"no-undef-init": 0,
9191
"no-undefined": 0,
9292
"no-unexpected-multiline": 0,
93-
"no-underscore-dangle": 2,
93+
"no-underscore-dangle": 0,
9494
"no-unneeded-ternary": 0,
9595
"no-unreachable": 2,
96-
"no-unused-expressions": 2,
96+
"no-unused-expressions": 0,
9797
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
98-
"no-use-before-define": 2,
98+
"no-use-before-define": 0,
9999
"no-useless-call": 0,
100100
"no-void": 0,
101101
"no-var": 0,
102102
"no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
103-
"no-with": 2,
104-
"no-wrap-func": 2,
103+
"no-with": 0,
104+
"no-wrap-func": 0,
105105

106106
"array-bracket-spacing": [0, "never"],
107107
"arrow-parens": 0,
@@ -110,39 +110,39 @@
110110
"block-scoped-var": 0,
111111
"brace-style": [0, "1tbs"],
112112
"callback-return": 0,
113-
"camelcase": 2,
113+
"camelcase": 0,
114114
"comma-dangle": [2, "never"],
115-
"comma-spacing": 2,
115+
"comma-spacing": 0,
116116
"comma-style": 0,
117117
"complexity": [0, 11],
118118
"computed-property-spacing": [0, "never"],
119-
"consistent-return": 2,
119+
"consistent-return": 0,
120120
"consistent-this": [0, "that"],
121121
"constructor-super": 0,
122-
"curly": [2, "all"],
122+
"curly": [0, "all"],
123123
"default-case": 0,
124124
"dot-location": 0,
125-
"dot-notation": [2, { "allowKeywords": true }],
126-
"eol-last": 2,
127-
"eqeqeq": 2,
125+
"dot-notation": [0, { "allowKeywords": true }],
126+
"eol-last": 0,
127+
"eqeqeq": 0,
128128
"func-names": 0,
129129
"func-style": [0, "declaration"],
130130
"generator-star": 0,
131131
"generator-star-spacing": 0,
132-
"global-strict": [2, "never"],
132+
"global-strict": [0, "never"],
133133
"guard-for-in": 0,
134134
"handle-callback-err": 0,
135135
"indent": 0,
136136
"init-declarations": 0,
137-
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
137+
"key-spacing": [0, { "beforeColon": false, "afterColon": true }],
138138
"lines-around-comment": 0,
139139
"max-depth": [0, 4],
140140
"max-len": [0, 80, 4],
141141
"max-nested-callbacks": [0, 2],
142142
"max-params": [0, 3],
143143
"max-statements": [0, 10],
144-
"new-cap": 2,
145-
"new-parens": 2,
144+
"new-cap": 0,
145+
"new-parens": 0,
146146
"newline-after-var": 0,
147147
"object-curly-spacing": [0, "never"],
148148
"object-shorthand": 0,
@@ -153,11 +153,11 @@
153153
"prefer-const": 0,
154154
"prefer-spread": 0,
155155
"quote-props": 0,
156-
"quotes": [2, "double"],
156+
"quotes": [0, "double"],
157157
"radix": 0,
158158
"require-yield": 0,
159-
"semi": 2,
160-
"semi-spacing": [2, {"before": false, "after": true}],
159+
"semi": 0,
160+
"semi-spacing": [0, {"before": false, "after": true}],
161161
"sort-vars": 0,
162162
"space-after-function-name": [0, "never"],
163163
"space-after-keywords": [0, "always"],
@@ -166,18 +166,18 @@
166166
"space-before-function-parentheses": [0, "always"],
167167
"space-in-brackets": [0, "never"],
168168
"space-in-parens": [0, "never"],
169-
"space-infix-ops": 2,
170-
"space-return-throw-case": 2,
171-
"space-unary-ops": [2, { "words": true, "nonwords": false }],
169+
"space-infix-ops": 0,
170+
"space-return-throw-case": 0,
171+
"space-unary-ops": [0, { "words": true, "nonwords": false }],
172172
"spaced-comment": 0,
173173
"spaced-line-comment": [0, "always"],
174-
"strict": 2,
174+
"strict": 0,
175175
"use-isnan": 2,
176176
"valid-jsdoc": 0,
177177
"valid-typeof": 2,
178178
"vars-on-top": 0,
179179
"wrap-iife": 0,
180180
"wrap-regex": 0,
181-
"yoda": [2, "never"]
181+
"yoda": [0, "never"]
182182
}
183183
}

0 commit comments

Comments
 (0)