@wildpastry/eslint-config 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +23 -31
- package/index.js +21 -25
- package/package.json +1 -1
package/.eslintrc
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"block-scoped-var": 1, // enforce the use of variables within the scope they are defined // DONE
|
|
72
72
|
"camelcase": 1, // enforce camelcase naming convention // DONE
|
|
73
73
|
"capitalized-comments": 1, // enforce or disallow capitalization of the first letter of a comment // DONE
|
|
74
|
-
"class-methods-use-this": 0, // enforce that class methods utilize `this` // DONE
|
|
74
|
+
"class-methods-use-this": 0, // enforce that class methods utilize `this` // DONE - OFF
|
|
75
75
|
"complexity": 0, // enforce a maximum cyclomatic complexity allowed in a program // DONE - OFF
|
|
76
76
|
"consistent-return": 1, // require `return` statements to either always or never specify values // DONE
|
|
77
77
|
"consistent-this": 1, // enforce consistent naming when capturing the current execution context // DONE
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"no-lone-blocks": 1, // disallow unnecessary nested blocks // DONE
|
|
133
133
|
"no-lonely-if": 1, // disallow `if` statements as the only statement in `else` blocks // DONE
|
|
134
134
|
"no-loop-func": 1, // disallow function declarations that contain unsafe references inside loop statements // DONE
|
|
135
|
-
"no-magic-numbers": 0, // disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE
|
|
135
|
+
"no-magic-numbers": 0, // disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE - OFF
|
|
136
136
|
"no-mixed-operators": 1, // disallow mixed binary operators // DONE
|
|
137
137
|
"no-multi-assign": 1, // disallow use of chained assignment expressions // DONE
|
|
138
138
|
"no-multi-str": 1, // disallow multiline strings // DONE
|
|
@@ -159,13 +159,13 @@
|
|
|
159
159
|
"no-return-await": 1, // disallow unnecessary `return await` // DONE
|
|
160
160
|
"no-script-url": 1, // disallow `javascript:` urls // DONE
|
|
161
161
|
"no-sequences": 1, // disallow comma operators // DONE
|
|
162
|
-
"no-shadow": 0, // disallow variable declarations from shadowing variables declared in the outer scope // DONE
|
|
162
|
+
"no-shadow": 0, // disallow variable declarations from shadowing variables declared in the outer scope // DONE - OFF
|
|
163
163
|
"no-shadow-restricted-names": 1, // disallow identifiers from shadowing restricted names // DONE
|
|
164
164
|
"no-ternary": 0, // disallow ternary operators // DONE - OFF
|
|
165
165
|
"no-throw-literal": 1, // disallow throwing literals as exceptions // DONE
|
|
166
166
|
"no-undef-init": 1, // disallow initializing variables to `undefined` // DONE
|
|
167
|
-
"no-undefined": 0, // disallow the use of `undefined` as an identifier // DONE
|
|
168
|
-
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers // DONE
|
|
167
|
+
"no-undefined": 0, // disallow the use of `undefined` as an identifier // DONE - OFF
|
|
168
|
+
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers // DONE - OFF
|
|
169
169
|
"no-unneeded-ternary": 0, // disallow ternary operators when simpler alternatives exist // DONE - OFF
|
|
170
170
|
"no-unused-expressions": 0, // disallow unused expressions // DONE - OFF
|
|
171
171
|
"no-unused-labels": 1, // disallow unused labels // DONE
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"no-useless-catch": 1, // disallow unnecessary `catch` clauses // DONE
|
|
174
174
|
"no-useless-computed-key": 1, // disallow unnecessary computed property keys in objects and classes // DONE
|
|
175
175
|
"no-useless-concat": 1, // disallow unnecessary concatenation of literals or template literals // DONE
|
|
176
|
-
"no-useless-constructor": 0, // disallow unnecessary constructors // DONE
|
|
176
|
+
"no-useless-constructor": 0, // disallow unnecessary constructors // DONE - OFF
|
|
177
177
|
"no-useless-escape": 1, // disallow unnecessary escape characters // DONE
|
|
178
178
|
"no-useless-rename": 1, // disallow renaming import, export, and destructured assignments to the same name // DONE
|
|
179
179
|
"no-useless-return": 1, // disallow redundant return statements // DONE
|
|
@@ -181,8 +181,8 @@
|
|
|
181
181
|
"no-void": [1, { "allowAsStatement": true }], // disallow `void` operators // DONE - CUSTOMISED
|
|
182
182
|
"no-warning-comments": 1, // disallow specified warning terms in comments // DONE
|
|
183
183
|
"no-with": 1, // disallow `with` statements // DONE
|
|
184
|
-
"object-shorthand": 0, // require or disallow method and property shorthand syntax for object literals // DONE
|
|
185
|
-
"one-var": 0, // enforce variables to be declared either together or separately in functions // DONE
|
|
184
|
+
"object-shorthand": 0, // require or disallow method and property shorthand syntax for object literals // DONE - OFF
|
|
185
|
+
"one-var": 0, // enforce variables to be declared either together or separately in functions // DONE - OFF
|
|
186
186
|
"one-var-declaration-per-line": 1, // require or disallow newlines around variable declarations // DONE
|
|
187
187
|
"operator-assignment": 1, // require or disallow assignment operator shorthand where possible // DONE
|
|
188
188
|
"prefer-arrow-callback": 1, // require using arrow functions for callbacks // DONE
|
|
@@ -197,13 +197,12 @@
|
|
|
197
197
|
"prefer-rest-params": 1, // require rest parameters instead of `arguments` // DONE
|
|
198
198
|
"prefer-spread": 1, // require spread operators instead of `.apply()` // DONE
|
|
199
199
|
"prefer-template": 1, // require template literals instead of string concatenation // DONE
|
|
200
|
-
"quote-props": 0, // require quotes around object literal property names // DONE
|
|
201
200
|
"radix": 1, // enforce the consistent use of the radix argument when using `parseInt()` // DONE
|
|
202
201
|
"require-await": 1, // disallow async functions which have no `await` expression // DONE
|
|
203
202
|
"require-unicode-regexp": 1, // enforce the use of `u` flag on RegExp // DONE
|
|
204
203
|
"require-yield": 1, // require generator functions to contain `yield` // DONE
|
|
205
204
|
"sort-imports": 1, // enforce sorted import declarations within modules // DONE
|
|
206
|
-
"sort-keys": 0, // require object keys to be sorted // DONE
|
|
205
|
+
"sort-keys": 0, // require object keys to be sorted // DONE - OFF
|
|
207
206
|
"sort-vars": 1, // require variables within the same declaration block to be sorted // DONE
|
|
208
207
|
"spaced-comment": 1, // enforce consistent spacing after the `//` or `/*` in a comment // DONE
|
|
209
208
|
"strict": 0, // require or disallow strict mode directives // DONE - OFF
|
|
@@ -211,7 +210,6 @@
|
|
|
211
210
|
"vars-on-top": 1, // require `var` declarations be placed at the top of their containing scope // DONE
|
|
212
211
|
"yoda": 1, // require or disallow "Yoda" conditions // DONE
|
|
213
212
|
"array-bracket-newline": 1, // enforce linebreaks after opening and before closing array brackets // DONE
|
|
214
|
-
"array-bracket-spacing": 1, // enforce consistent spacing inside array brackets // DONE
|
|
215
213
|
"array-element-newline": 0, // enforce line breaks after each array element // DONE - OFF
|
|
216
214
|
"arrow-parens": 1, // require parentheses around arrow function arguments // DONE
|
|
217
215
|
"arrow-spacing": 1, // enforce consistent spacing before and after the arrow in arrow functions // DONE
|
|
@@ -221,25 +219,21 @@
|
|
|
221
219
|
"comma-spacing": 1, // enforce consistent spacing before and after commas // DONE
|
|
222
220
|
"comma-style": 1, // enforce consistent comma style // DONE
|
|
223
221
|
"computed-property-spacing": 1, // enforce consistent spacing inside computed property brackets // DONE
|
|
224
|
-
"dot-location": 0, // enforce consistent newlines before and after dots // DONE
|
|
222
|
+
"dot-location": 0, // enforce consistent newlines before and after dots // DONE - OFF
|
|
225
223
|
"eol-last": 1, // require or disallow newline at the end of files // DONE
|
|
226
224
|
"func-call-spacing": 1, // require or disallow spacing between function identifiers and their invocations // DONE
|
|
227
225
|
"function-call-argument-newline": [1, "consistent"], // enforce line breaks between arguments of a function call // DONE - CUSTOMISED
|
|
228
|
-
"function-paren-newline": [1, "multiline-arguments"], // enforce consistent line breaks inside function parentheses // DONE
|
|
226
|
+
"function-paren-newline": [1, "multiline-arguments"], // enforce consistent line breaks inside function parentheses // DONE - CUSTOMISED
|
|
229
227
|
"generator-star-spacing": 1, // enforce consistent spacing around `*` operators in generator functions // DONE
|
|
230
228
|
"implicit-arrow-linebreak": 1, // enforce the location of arrow function bodies // DONE
|
|
231
229
|
"indent": [1, 2], // enforce consistent indentation. second value is number of spaces // DONE
|
|
232
|
-
"jsx-quotes": [1, "prefer-single"], // enforce the consistent use of either double or single quotes in JSX attributes // DONE
|
|
233
|
-
"key-spacing": [1, { "beforeColon": false }], // enforce consistent spacing between keys and values in object literal properties // DONE
|
|
234
|
-
"keyword-spacing": [1, { "before": true }], // enforce consistent spacing before and after keywords // DONE
|
|
230
|
+
"jsx-quotes": [1, "prefer-single"], // enforce the consistent use of either double or single quotes in JSX attributes // DONE - CUSTOMISED
|
|
231
|
+
"key-spacing": [1, { "beforeColon": false }], // enforce consistent spacing between keys and values in object literal properties // DONE - CUSTOMISED
|
|
235
232
|
"line-comment-position": 1, // enforce position of line comments // DONE
|
|
236
233
|
"linebreak-style": 0, // enforce consistent linebreak style // OFF
|
|
237
234
|
"lines-around-comment": 1, // require empty lines around comments // DONE
|
|
238
|
-
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE
|
|
239
|
-
"max-len": [
|
|
240
|
-
1,
|
|
241
|
-
{ "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }
|
|
242
|
-
], // enforce a maximum line length // DONE - CUSTOMISED
|
|
235
|
+
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE - OFF
|
|
236
|
+
"max-len": [1, { "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
|
|
243
237
|
"max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
|
|
244
238
|
"multiline-ternary": 0, // enforce newlines between operands of ternary expressions // DONE - OFF
|
|
245
239
|
"new-parens": 1, // enforce or disallow parentheses when invoking a constructor with no arguments // DONE
|
|
@@ -253,10 +247,10 @@
|
|
|
253
247
|
"no-whitespace-before-property": 1, // disallow whitespace before properties // DONE
|
|
254
248
|
"nonblock-statement-body-position": 1, // enforce the location of single-line statements // DONE
|
|
255
249
|
"object-curly-newline": 1, // enforce consistent line breaks after opening and before closing braces // DONE
|
|
256
|
-
"object-curly-spacing": [
|
|
250
|
+
"object-curly-spacing": [0, "always"], // enforce consistent spacing inside braces // DONE - OFF
|
|
257
251
|
"object-property-newline": 0, // enforce placing object properties on separate lines // DONE - OFF
|
|
258
252
|
"operator-linebreak": 1, // enforce consistent linebreak style for operators // DONE
|
|
259
|
-
"padded-blocks": 0, // require or disallow padding within blocks // DONE
|
|
253
|
+
"padded-blocks": 0, // require or disallow padding within blocks // DONE - OFF
|
|
260
254
|
"padding-line-between-statements": 1, // require or disallow padding lines between statements // DONE
|
|
261
255
|
"quotes": [1, "single"], // enforce the consistent use of either backticks, double, or single quotes // DONE
|
|
262
256
|
"rest-spread-spacing": 1, // enforce spacing between rest and spread operators and their expressions // DONE
|
|
@@ -264,7 +258,7 @@
|
|
|
264
258
|
"semi-spacing": 1, // enforce consistent spacing before and after semicolons // DONE
|
|
265
259
|
"semi-style": 1, // enforce location of semicolons // DONE
|
|
266
260
|
"space-before-blocks": 1, // enforce consistent spacing before blocks // DONE
|
|
267
|
-
"space-before-function-paren": 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE
|
|
261
|
+
"space-before-function-paren": 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE - OFF
|
|
268
262
|
"space-in-parens": 1, // enforce consistent spacing inside parentheses // DONE
|
|
269
263
|
"space-infix-ops": 1, // require spacing around infix operators // DONE
|
|
270
264
|
"space-unary-ops": 1, // enforce consistent spacing before or after unary operators // DONE
|
|
@@ -282,7 +276,6 @@
|
|
|
282
276
|
"no-dupe-args": 1, // disallow duplicate arguments in functions // DONE
|
|
283
277
|
"no-dupe-keys": 1, // disallow duplicate keys when creating object literals // DONE
|
|
284
278
|
"no-duplicate-case": 1, // disallow a duplicate case label // DONE
|
|
285
|
-
"no-empty-class": 1, // disallow the use of empty character classes in regular expressions // DONE
|
|
286
279
|
"no-ex-assign": 1, // disallow assigning to the exception in a catch block // DONE
|
|
287
280
|
"no-func-assign": 1, // disallow overwriting functions written as function declarations // DONE
|
|
288
281
|
"no-inner-declarations": 1, // disallow function or variable declarations in nested blocks // DONE
|
|
@@ -290,7 +283,7 @@
|
|
|
290
283
|
"no-irregular-whitespace": 1, // disallow irregular whitespace outside of strings and comments // DONE
|
|
291
284
|
"no-negated-in-lhs": 1, // disallow negation of the left operand of an in expression // DONE
|
|
292
285
|
"no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions // DONE
|
|
293
|
-
"
|
|
286
|
+
"quote-props": [1, "as-needed"], // require quotes around object literal property names // DONE - CUSTOMISED
|
|
294
287
|
"no-sparse-arrays": 1, // disallow sparse arrays // DONE
|
|
295
288
|
"no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement // DONE
|
|
296
289
|
"use-isnan": 1, // disallow comparisons with the value NaN // DONE
|
|
@@ -300,10 +293,9 @@
|
|
|
300
293
|
"no-unused-vars": 1, // disallow declaration of variables that are not used in the code // DONE
|
|
301
294
|
"newline-after-var": 0, // allow/disallow an empty newline after var statement // DONE - OFF
|
|
302
295
|
"no-spaced-func": 1, // disallow space between function identifier and application // DONE
|
|
303
|
-
"
|
|
304
|
-
"
|
|
305
|
-
|
|
306
|
-
|
|
296
|
+
"keyword-spacing": [1, { "before": true }], // enforce consistent spacing before and after keywords // DONE - CUSTOMISED
|
|
297
|
+
"array-bracket-spacing": [0, "always"], // enforces consistent spacing inside array brackets // DONE - CUSTOMISED
|
|
298
|
+
|
|
307
299
|
// React specific
|
|
308
300
|
"react/display-name": 0, // prevent missing displayName in a React component definition // DONE - OFF
|
|
309
301
|
"react/jsx-no-undef": 1, // disallow undeclared variables in JSX // DONE
|
|
@@ -315,7 +307,7 @@
|
|
|
315
307
|
"react/no-multi-comp": 0, // prevent multiple component definition per file // DONE - OFF
|
|
316
308
|
"react/no-unknown-property": 1, // prevent usage of unknown DOM property // DONE
|
|
317
309
|
"react/prop-types": 1, // prevent missing props validation in a React component definition // DONE
|
|
318
|
-
"react/react-in-jsx-scope":
|
|
310
|
+
"react/react-in-jsx-scope": 0, // prevent missing React when using JSX // DONE - OFF
|
|
319
311
|
"react/self-closing-comp": 1 // prevent extra closing tags for components without children // DONE
|
|
320
312
|
}
|
|
321
313
|
}
|
package/index.js
CHANGED
|
@@ -57,7 +57,7 @@ module.exports = {
|
|
|
57
57
|
"block-scoped-var": 1, // enforce the use of variables within the scope they are defined // DONE
|
|
58
58
|
"camelcase": 1, // enforce camelcase naming convention // DONE
|
|
59
59
|
"capitalized-comments": 1, // enforce or disallow capitalization of the first letter of a comment // DONE
|
|
60
|
-
"class-methods-use-this": 0, // enforce that class methods utilize `this` // DONE
|
|
60
|
+
"class-methods-use-this": 0, // enforce that class methods utilize `this` // DONE - OFF
|
|
61
61
|
"complexity": 0, // enforce a maximum cyclomatic complexity allowed in a program // DONE - OFF
|
|
62
62
|
"consistent-return": 1, // require `return` statements to either always or never specify values // DONE
|
|
63
63
|
"consistent-this": 1, // enforce consistent naming when capturing the current execution context // DONE
|
|
@@ -118,7 +118,7 @@ module.exports = {
|
|
|
118
118
|
"no-lone-blocks": 1, // disallow unnecessary nested blocks // DONE
|
|
119
119
|
"no-lonely-if": 1, // disallow `if` statements as the only statement in `else` blocks // DONE
|
|
120
120
|
"no-loop-func": 1, // disallow function declarations that contain unsafe references inside loop statements // DONE
|
|
121
|
-
"no-magic-numbers": 0, // disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE
|
|
121
|
+
"no-magic-numbers": 0, // disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE - OFF
|
|
122
122
|
"no-mixed-operators": 1, // disallow mixed binary operators // DONE
|
|
123
123
|
"no-multi-assign": 1, // disallow use of chained assignment expressions // DONE
|
|
124
124
|
"no-multi-str": 1, // disallow multiline strings // DONE
|
|
@@ -145,13 +145,13 @@ module.exports = {
|
|
|
145
145
|
"no-return-await": 1, // disallow unnecessary `return await` // DONE
|
|
146
146
|
"no-script-url": 1, // disallow `javascript:` urls // DONE
|
|
147
147
|
"no-sequences": 1, // disallow comma operators // DONE
|
|
148
|
-
"no-shadow": 0, // disallow variable declarations from shadowing variables declared in the outer scope // DONE
|
|
148
|
+
"no-shadow": 0, // disallow variable declarations from shadowing variables declared in the outer scope // DONE - OFF
|
|
149
149
|
"no-shadow-restricted-names": 1, // disallow identifiers from shadowing restricted names // DONE
|
|
150
150
|
"no-ternary": 0, // disallow ternary operators // DONE - OFF
|
|
151
151
|
"no-throw-literal": 1, // disallow throwing literals as exceptions // DONE
|
|
152
152
|
"no-undef-init": 1, // disallow initializing variables to `undefined` // DONE
|
|
153
|
-
"no-undefined": 0, // disallow the use of `undefined` as an identifier // DONE
|
|
154
|
-
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers // DONE
|
|
153
|
+
"no-undefined": 0, // disallow the use of `undefined` as an identifier // DONE - OFF
|
|
154
|
+
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers // DONE - OFF
|
|
155
155
|
"no-unneeded-ternary": 0, // disallow ternary operators when simpler alternatives exist // DONE - OFF
|
|
156
156
|
"no-unused-expressions": 0, // disallow unused expressions // DONE - OFF
|
|
157
157
|
"no-unused-labels": 1, // disallow unused labels // DONE
|
|
@@ -159,7 +159,7 @@ module.exports = {
|
|
|
159
159
|
"no-useless-catch": 1, // disallow unnecessary `catch` clauses // DONE
|
|
160
160
|
"no-useless-computed-key": 1, // disallow unnecessary computed property keys in objects and classes // DONE
|
|
161
161
|
"no-useless-concat": 1, // disallow unnecessary concatenation of literals or template literals // DONE
|
|
162
|
-
"no-useless-constructor": 0, // disallow unnecessary constructors // DONE
|
|
162
|
+
"no-useless-constructor": 0, // disallow unnecessary constructors // DONE - OFF
|
|
163
163
|
"no-useless-escape": 1, // disallow unnecessary escape characters // DONE
|
|
164
164
|
"no-useless-rename": 1, // disallow renaming import, export, and destructured assignments to the same name // DONE
|
|
165
165
|
"no-useless-return": 1, // disallow redundant return statements // DONE
|
|
@@ -167,8 +167,8 @@ module.exports = {
|
|
|
167
167
|
"no-void": [1, { "allowAsStatement": true }], // disallow `void` operators // DONE - CUSTOMISED
|
|
168
168
|
"no-warning-comments": 1, // disallow specified warning terms in comments // DONE
|
|
169
169
|
"no-with": 1, // disallow `with` statements // DONE
|
|
170
|
-
"object-shorthand": 0, // require or disallow method and property shorthand syntax for object literals // DONE
|
|
171
|
-
"one-var": 0, // enforce variables to be declared either together or separately in functions // DONE
|
|
170
|
+
"object-shorthand": 0, // require or disallow method and property shorthand syntax for object literals // DONE - OFF
|
|
171
|
+
"one-var": 0, // enforce variables to be declared either together or separately in functions // DONE - OFF
|
|
172
172
|
"one-var-declaration-per-line": 1, // require or disallow newlines around variable declarations // DONE
|
|
173
173
|
"operator-assignment": 1, // require or disallow assignment operator shorthand where possible // DONE
|
|
174
174
|
"prefer-arrow-callback": 1, // require using arrow functions for callbacks // DONE
|
|
@@ -183,13 +183,12 @@ module.exports = {
|
|
|
183
183
|
"prefer-rest-params": 1, // require rest parameters instead of `arguments` // DONE
|
|
184
184
|
"prefer-spread": 1, // require spread operators instead of `.apply()` // DONE
|
|
185
185
|
"prefer-template": 1, // require template literals instead of string concatenation // DONE
|
|
186
|
-
"quote-props": 0, // require quotes around object literal property names // DONE
|
|
187
186
|
"radix": 1, // enforce the consistent use of the radix argument when using `parseInt()` // DONE
|
|
188
187
|
"require-await": 1, // disallow async functions which have no `await` expression // DONE
|
|
189
188
|
"require-unicode-regexp": 1, // enforce the use of `u` flag on RegExp // DONE
|
|
190
189
|
"require-yield": 1, // require generator functions to contain `yield` // DONE
|
|
191
190
|
"sort-imports": 1, // enforce sorted import declarations within modules // DONE
|
|
192
|
-
"sort-keys": 0, // require object keys to be sorted // DONE
|
|
191
|
+
"sort-keys": 0, // require object keys to be sorted // DONE - OFF
|
|
193
192
|
"sort-vars": 1, // require variables within the same declaration block to be sorted // DONE
|
|
194
193
|
"spaced-comment": 1, // enforce consistent spacing after the `//` or `/*` in a comment // DONE
|
|
195
194
|
"strict": 0, // require or disallow strict mode directives // DONE - OFF
|
|
@@ -197,7 +196,6 @@ module.exports = {
|
|
|
197
196
|
"vars-on-top": 1, // require `var` declarations be placed at the top of their containing scope // DONE
|
|
198
197
|
"yoda": 1, // require or disallow "Yoda" conditions // DONE
|
|
199
198
|
"array-bracket-newline": 1, // enforce linebreaks after opening and before closing array brackets // DONE
|
|
200
|
-
"array-bracket-spacing": 1, // enforce consistent spacing inside array brackets // DONE
|
|
201
199
|
"array-element-newline": 0, // enforce line breaks after each array element // DONE - OFF
|
|
202
200
|
"arrow-parens": 1, // require parentheses around arrow function arguments // DONE
|
|
203
201
|
"arrow-spacing": 1, // enforce consistent spacing before and after the arrow in arrow functions // DONE
|
|
@@ -207,21 +205,20 @@ module.exports = {
|
|
|
207
205
|
"comma-spacing": 1, // enforce consistent spacing before and after commas // DONE
|
|
208
206
|
"comma-style": 1, // enforce consistent comma style // DONE
|
|
209
207
|
"computed-property-spacing": 1, // enforce consistent spacing inside computed property brackets // DONE
|
|
210
|
-
"dot-location": 0, // enforce consistent newlines before and after dots // DONE
|
|
208
|
+
"dot-location": 0, // enforce consistent newlines before and after dots // DONE - OFF
|
|
211
209
|
"eol-last": 1, // require or disallow newline at the end of files // DONE
|
|
212
210
|
"func-call-spacing": 1, // require or disallow spacing between function identifiers and their invocations // DONE
|
|
213
211
|
"function-call-argument-newline": [1, "consistent"], // enforce line breaks between arguments of a function call // DONE - CUSTOMISED
|
|
214
|
-
"function-paren-newline": [1, "multiline-arguments"], // enforce consistent line breaks inside function parentheses // DONE
|
|
212
|
+
"function-paren-newline": [1, "multiline-arguments"], // enforce consistent line breaks inside function parentheses // DONE - CUSTOMISED
|
|
215
213
|
"generator-star-spacing": 1, // enforce consistent spacing around `*` operators in generator functions // DONE
|
|
216
214
|
"implicit-arrow-linebreak": 1, // enforce the location of arrow function bodies // DONE
|
|
217
215
|
"indent": [1, 2], // enforce consistent indentation. second value is number of spaces // DONE
|
|
218
|
-
"jsx-quotes": [1, "prefer-single"], // enforce the consistent use of either double or single quotes in JSX attributes // DONE
|
|
219
|
-
"key-spacing": [1, { "beforeColon": false }], // enforce consistent spacing between keys and values in object literal properties // DONE
|
|
220
|
-
"keyword-spacing": "always", // enforce consistent spacing before and after keywords // DONE
|
|
216
|
+
"jsx-quotes": [1, "prefer-single"], // enforce the consistent use of either double or single quotes in JSX attributes // DONE - CUSTOMISED
|
|
217
|
+
"key-spacing": [1, { "beforeColon": false }], // enforce consistent spacing between keys and values in object literal properties // DONE - CUSTOMISED
|
|
221
218
|
"line-comment-position": 1, // enforce position of line comments // DONE
|
|
222
219
|
"linebreak-style": 0, // enforce consistent linebreak style // OFF
|
|
223
220
|
"lines-around-comment": 1, // require empty lines around comments // DONE
|
|
224
|
-
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE
|
|
221
|
+
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE - OFF
|
|
225
222
|
"max-len": [1, { "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }], // enforce a maximum line length // DONE - CUSTOMISED
|
|
226
223
|
"max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
|
|
227
224
|
"multiline-ternary": 0, // enforce newlines between operands of ternary expressions // DONE - OFF
|
|
@@ -236,10 +233,10 @@ module.exports = {
|
|
|
236
233
|
"no-whitespace-before-property": 1, // disallow whitespace before properties // DONE
|
|
237
234
|
"nonblock-statement-body-position": 1, // enforce the location of single-line statements // DONE
|
|
238
235
|
"object-curly-newline": 1, // enforce consistent line breaks after opening and before closing braces // DONE
|
|
239
|
-
"object-curly-spacing": [
|
|
236
|
+
"object-curly-spacing": [0, "always"], // enforce consistent spacing inside braces // DONE - OFF
|
|
240
237
|
"object-property-newline": 0, // enforce placing object properties on separate lines // DONE - OFF
|
|
241
238
|
"operator-linebreak": 1, // enforce consistent linebreak style for operators // DONE
|
|
242
|
-
"padded-blocks": 0, // require or disallow padding within blocks // DONE
|
|
239
|
+
"padded-blocks": 0, // require or disallow padding within blocks // DONE - OFF
|
|
243
240
|
"padding-line-between-statements": 1, // require or disallow padding lines between statements // DONE
|
|
244
241
|
"quotes": [1, "single"], // enforce the consistent use of either backticks, double, or single quotes // DONE
|
|
245
242
|
"rest-spread-spacing": 1, // enforce spacing between rest and spread operators and their expressions // DONE
|
|
@@ -247,7 +244,7 @@ module.exports = {
|
|
|
247
244
|
"semi-spacing": 1, // enforce consistent spacing before and after semicolons // DONE
|
|
248
245
|
"semi-style": 1, // enforce location of semicolons // DONE
|
|
249
246
|
"space-before-blocks": 1, // enforce consistent spacing before blocks // DONE
|
|
250
|
-
"space-before-function-paren": 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE
|
|
247
|
+
"space-before-function-paren": 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE - OFF
|
|
251
248
|
"space-in-parens": 1, // enforce consistent spacing inside parentheses // DONE
|
|
252
249
|
"space-infix-ops": 1, // require spacing around infix operators // DONE
|
|
253
250
|
"space-unary-ops": 1, // enforce consistent spacing before or after unary operators // DONE
|
|
@@ -272,7 +269,7 @@ module.exports = {
|
|
|
272
269
|
"no-irregular-whitespace": 1, // disallow irregular whitespace outside of strings and comments // DONE
|
|
273
270
|
"no-negated-in-lhs": 1, // disallow negation of the left operand of an in expression // DONE
|
|
274
271
|
"no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions // DONE
|
|
275
|
-
"quote-props": [1, "as-needed"], // require quotes around object literal property names // DONE
|
|
272
|
+
"quote-props": [1, "as-needed"], // require quotes around object literal property names // DONE - CUSTOMISED
|
|
276
273
|
"no-sparse-arrays": 1, // disallow sparse arrays // DONE
|
|
277
274
|
"no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement // DONE
|
|
278
275
|
"use-isnan": 1, // disallow comparisons with the value NaN // DONE
|
|
@@ -282,9 +279,8 @@ module.exports = {
|
|
|
282
279
|
"no-unused-vars": 1, // disallow declaration of variables that are not used in the code // DONE
|
|
283
280
|
"newline-after-var": 0, // allow/disallow an empty newline after var statement // DONE - OFF
|
|
284
281
|
"no-spaced-func": 1, // disallow space between function identifier and application // DONE
|
|
285
|
-
"keyword-spacing": [1, { "before": true }], // enforce consistent spacing before and after keywords // DONE
|
|
286
|
-
"
|
|
287
|
-
"array-bracket-spacing": [1, "always"], // enforces consistent spacing inside array brackets // DONE
|
|
282
|
+
"keyword-spacing": [1, { "before": true }], // enforce consistent spacing before and after keywords // DONE - CUSTOMISED
|
|
283
|
+
"array-bracket-spacing": [0, "always"], // enforces consistent spacing inside array brackets // DONE - CUSTOMISED
|
|
288
284
|
|
|
289
285
|
// React specific
|
|
290
286
|
"react/display-name": 0, // prevent missing displayName in a React component definition // DONE - OFF
|
|
@@ -297,7 +293,7 @@ module.exports = {
|
|
|
297
293
|
"react/no-multi-comp": 0, // prevent multiple component definition per file // DONE - OFF
|
|
298
294
|
"react/no-unknown-property": 1, // prevent usage of unknown DOM property // DONE
|
|
299
295
|
"react/prop-types": 1, // prevent missing props validation in a React component definition // DONE
|
|
300
|
-
"react/react-in-jsx-scope":
|
|
296
|
+
"react/react-in-jsx-scope": 0, // prevent missing React when using JSX // DONE - OFF
|
|
301
297
|
"react/self-closing-comp": 1 // prevent extra closing tags for components without children // DONE
|
|
302
298
|
},
|
|
303
299
|
};
|