@wildpastry/eslint-config 1.0.0
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 +492 -0
- package/README.md +3 -0
- package/index.js +15 -0
- package/package.json +22 -0
package/.eslintrc
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
/* KEY:
|
|
2
|
+
|
|
3
|
+
* DONE = Checked and accepted rule
|
|
4
|
+
|
|
5
|
+
* DONE - CUSTOMISED = Accepted rule but changed default behaviour
|
|
6
|
+
|
|
7
|
+
* DONE - OFF = Disabled rule
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
{
|
|
12
|
+
"root": true,
|
|
13
|
+
|
|
14
|
+
"ignorePatterns": ["projects/**/*", "cypress/*"],
|
|
15
|
+
|
|
16
|
+
"overrides": [
|
|
17
|
+
{
|
|
18
|
+
"plugins": ["react"],
|
|
19
|
+
|
|
20
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
21
|
+
|
|
22
|
+
"parserOptions": {
|
|
23
|
+
"project": ["**/tsconfig.json"],
|
|
24
|
+
"sourceType": "module",
|
|
25
|
+
"createDefaultProgram": true,
|
|
26
|
+
"ecmaFeatures": {
|
|
27
|
+
"jsx": true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
"extends": [
|
|
32
|
+
"eslint:recommended",
|
|
33
|
+
|
|
34
|
+
"plugin:@typescript-eslint/recommended",
|
|
35
|
+
|
|
36
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
|
37
|
+
|
|
38
|
+
],
|
|
39
|
+
|
|
40
|
+
"rules": {
|
|
41
|
+
"react/jsx-uses-react": 1, // DONE
|
|
42
|
+
|
|
43
|
+
"react/jsx-uses-vars": 1, // DONE
|
|
44
|
+
|
|
45
|
+
"@typescript-eslint/no-inferrable-types": 0, // DONE - OFF
|
|
46
|
+
|
|
47
|
+
"@typescript-eslint/no-unsafe-assignment": 0, // DONE - OFF
|
|
48
|
+
|
|
49
|
+
"@typescript-eslint/no-unsafe-member-access": 0, // DONE - OFF
|
|
50
|
+
|
|
51
|
+
"array-callback-return": 0, //enforce `return` statements in callbacks of array methods // DONE - OFF
|
|
52
|
+
|
|
53
|
+
"no-await-in-loop": 0, //disallow `await` inside of loops // DONE - OFF
|
|
54
|
+
|
|
55
|
+
"no-constructor-return": 0, //disallow returning value from constructor // DONE - OFF
|
|
56
|
+
|
|
57
|
+
"no-duplicate-imports": 1, //disallow duplicate module imports // DONE
|
|
58
|
+
|
|
59
|
+
"no-promise-executor-return": 0, //disallow returning values from Promise executor functions // DONE - OFF
|
|
60
|
+
|
|
61
|
+
"no-self-compare": 1, //disallow comparisons where both sides are exactly the same // DONE
|
|
62
|
+
|
|
63
|
+
"no-template-curly-in-string": 0, //disallow template literal placeholder syntax in regular strings // DONE - OFF
|
|
64
|
+
|
|
65
|
+
"no-unmodified-loop-condition": 1, //disallow unmodified loop conditions // DONE
|
|
66
|
+
|
|
67
|
+
"no-unreachable-loop": 1, //disallow loops with a body that allows only one iteration // DONE
|
|
68
|
+
|
|
69
|
+
"no-use-before-define": 0, //disallow the use of variables before they are defined // DONE - OFF
|
|
70
|
+
|
|
71
|
+
"require-atomic-updates": 1, //disallow assignments that can lead to race conditions due to usage of `await` or `yield` // DONE
|
|
72
|
+
|
|
73
|
+
"accessor-pairs": 0, //enforce getter and setter pairs in objects and classes // DONE - OFF
|
|
74
|
+
|
|
75
|
+
"arrow-body-style": 0, //require braces around arrow function bodies // DONE - OFF
|
|
76
|
+
|
|
77
|
+
"block-scoped-var": 1, //enforce the use of variables within the scope they are defined // DONE
|
|
78
|
+
|
|
79
|
+
"camelcase": 1, //enforce camelcase naming convention // DONE
|
|
80
|
+
|
|
81
|
+
"capitalized-comments": 1, //enforce or disallow capitalization of the first letter of a comment // DONE
|
|
82
|
+
|
|
83
|
+
"class-methods-use-this": 0, //enforce that class methods utilize `this` // DONE
|
|
84
|
+
|
|
85
|
+
"complexity": 1, //enforce a maximum cyclomatic complexity allowed in a program // DONE
|
|
86
|
+
|
|
87
|
+
"consistent-return": 1, //require `return` statements to either always or never specify values // DONE
|
|
88
|
+
|
|
89
|
+
"consistent-this": 1, //enforce consistent naming when capturing the current execution context // DONE
|
|
90
|
+
|
|
91
|
+
"curly": 1, //enforce consistent brace style for all control statements // DONE
|
|
92
|
+
|
|
93
|
+
"default-case": 1, //require `default` cases in `switch` statements // DONE
|
|
94
|
+
|
|
95
|
+
"default-case-last": 1, //enforce default clauses in switch statements to be last // DONE
|
|
96
|
+
|
|
97
|
+
"default-param-last": 1, //enforce default parameters to be last // DONE
|
|
98
|
+
|
|
99
|
+
"dot-notation": 1, //enforce dot notation whenever possible // DONE
|
|
100
|
+
|
|
101
|
+
"eqeqeq": 1, //require the use of `===` and `!==` // DONE
|
|
102
|
+
|
|
103
|
+
"func-name-matching": 1, //require function names to match the name of the variable or property to which they are assigned // DONE
|
|
104
|
+
|
|
105
|
+
"func-names": 1, //require or disallow named `function` expressions // DONE
|
|
106
|
+
|
|
107
|
+
"func-style": 0, //enforce the consistent use of either `function` declarations or expressions // DONE - OFF
|
|
108
|
+
|
|
109
|
+
"grouped-accessor-pairs": 1, //require grouped accessor pairs in object literals and classes // DONE
|
|
110
|
+
|
|
111
|
+
"guard-for-in": 1, //require `for-in` loops to include an `if` statement // DONE
|
|
112
|
+
|
|
113
|
+
"id-denylist": 1, //disallow specified identifiers // DONE
|
|
114
|
+
|
|
115
|
+
"id-length": 0, //enforce minimum and maximum identifier lengths // DONE - OFF
|
|
116
|
+
|
|
117
|
+
"id-match": 1, //require identifiers to match a specified regular expression // DONE
|
|
118
|
+
|
|
119
|
+
"init-declarations": 0, //require or disallow initialization in variable declarations // DONE - OFF
|
|
120
|
+
|
|
121
|
+
"max-classes-per-file": 1, //enforce a maximum number of classes per file // DONE
|
|
122
|
+
|
|
123
|
+
"max-depth": 1, //enforce a maximum depth that blocks can be nested // DONE
|
|
124
|
+
|
|
125
|
+
"max-lines": ["warn", { "max": 600, "skipBlankLines": true }], //enforce a maximum number of lines per file // DONE - CUSTOMISED
|
|
126
|
+
|
|
127
|
+
"max-lines-per-function": ["warn", { "max": 300 }], //enforce a maximum number of lines of code in a function // DONE - CUSTOMISED
|
|
128
|
+
|
|
129
|
+
"max-nested-callbacks": 1, //enforce a maximum depth that callbacks can be nested // DONE
|
|
130
|
+
|
|
131
|
+
"max-params": ["warn", { "max": 7 }], //enforce a maximum number of parameters in function definitions // DONE - CUSTOMISED
|
|
132
|
+
|
|
133
|
+
"max-statements": ["warn", { "max": 20 }], //enforce a maximum number of statements allowed in function blocks // DONE - CUSTOMISED
|
|
134
|
+
|
|
135
|
+
"multiline-comment-style": 1, //enforce a particular style for multiline comments // DONE
|
|
136
|
+
|
|
137
|
+
"new-cap": 0, //require constructor names to begin with a capital letter // DONE - OFF
|
|
138
|
+
|
|
139
|
+
"no-alert": 1, //disallow the use of `alert`, `confirm`, and `prompt` // DONE
|
|
140
|
+
|
|
141
|
+
"no-array-constructor": 1, //disallow `Array` constructors // DONE
|
|
142
|
+
|
|
143
|
+
"no-bitwise": 1, //disallow bitwise operators // DONE
|
|
144
|
+
|
|
145
|
+
"no-caller": 1, //disallow the use of `arguments.caller` or `arguments.callee` // DONE
|
|
146
|
+
|
|
147
|
+
"no-case-declarations": 1, //disallow lexical declarations in case clauses // DONE
|
|
148
|
+
|
|
149
|
+
"no-confusing-arrow": 1, //disallow arrow functions where they could be confused with comparisons // DONE
|
|
150
|
+
|
|
151
|
+
"no-console": 1, //disallow the use of `console` // DONE
|
|
152
|
+
|
|
153
|
+
"no-continue": 1, //disallow `continue` statements // DONE
|
|
154
|
+
|
|
155
|
+
"no-delete-var": 1, //disallow deleting variables // DONE
|
|
156
|
+
|
|
157
|
+
"no-div-regex": 1, //disallow division operators explicitly at the beginning of regular expressions // DONE
|
|
158
|
+
|
|
159
|
+
"no-else-return": 1, //disallow `else` blocks after `return` statements in `if` statements // DONE
|
|
160
|
+
|
|
161
|
+
"no-empty": 1, //disallow empty block statements // DONE
|
|
162
|
+
|
|
163
|
+
"no-empty-function": ["error", { "allow": ["constructors"] }], //disallow empty functions // DONE - CUSTOMISED
|
|
164
|
+
|
|
165
|
+
"no-eq-null": 1, //disallow `null` comparisons without type-checking operators // DONE
|
|
166
|
+
|
|
167
|
+
"no-eval": 1, //disallow the use of `eval()` // DONE
|
|
168
|
+
|
|
169
|
+
"no-extend-native": 1, //disallow extending native types // DONE
|
|
170
|
+
|
|
171
|
+
"no-extra-bind": 1, //disallow unnecessary calls to `.bind()` // DONE
|
|
172
|
+
|
|
173
|
+
"no-extra-boolean-cast": 1, //disallow unnecessary boolean casts // DONE
|
|
174
|
+
|
|
175
|
+
"no-extra-label": 1, //disallow unnecessary labels // DONE
|
|
176
|
+
|
|
177
|
+
"no-extra-semi": 1, //disallow unnecessary semicolons // DONE
|
|
178
|
+
|
|
179
|
+
"no-floating-decimal": 1, //disallow leading or trailing decimal points in numeric literals // DONE
|
|
180
|
+
|
|
181
|
+
"no-global-assign": 1, //disallow assignments to native objects or read-only global variables // DONE
|
|
182
|
+
|
|
183
|
+
"no-implicit-coercion": 1, //disallow shorthand type conversions // DONE
|
|
184
|
+
|
|
185
|
+
"no-implicit-globals": 1, //disallow declarations in the global scope // DONE
|
|
186
|
+
|
|
187
|
+
"no-implied-eval": 1, //disallow the use of `eval()`-like methods // DONE
|
|
188
|
+
|
|
189
|
+
"no-inline-comments": 1, //disallow inline comments after code // DONE
|
|
190
|
+
|
|
191
|
+
"no-invalid-this": 1, //disallow `this` keywords outside of classes or class-like objects // DONE
|
|
192
|
+
|
|
193
|
+
"no-iterator": 1, //disallow the use of the `__iterator__` property // DONE
|
|
194
|
+
|
|
195
|
+
"no-label-var": 1, //disallow labels that share a name with a variable // DONE
|
|
196
|
+
|
|
197
|
+
"no-labels": 1, //disallow labeled statements // DONE
|
|
198
|
+
|
|
199
|
+
"no-lone-blocks": 1, //disallow unnecessary nested blocks // DONE
|
|
200
|
+
|
|
201
|
+
"no-lonely-if": 1, //disallow `if` statements as the only statement in `else` blocks // DONE
|
|
202
|
+
|
|
203
|
+
"no-loop-func": 1, //disallow function declarations that contain unsafe references inside loop statements // DONE
|
|
204
|
+
|
|
205
|
+
"no-magic-numbers": 0, //disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE
|
|
206
|
+
|
|
207
|
+
"no-mixed-operators": 1, //disallow mixed binary operators // DONE
|
|
208
|
+
|
|
209
|
+
"no-multi-assign": 1, //disallow use of chained assignment expressions // DONE
|
|
210
|
+
|
|
211
|
+
"no-multi-str": 1, //disallow multiline strings // DONE
|
|
212
|
+
|
|
213
|
+
"no-negated-condition": 1, //disallow negated conditions // DONE
|
|
214
|
+
|
|
215
|
+
"no-nested-ternary": 1, //disallow nested ternary expressions // DONE
|
|
216
|
+
|
|
217
|
+
"no-new": 1, //disallow `new` operators outside of assignments or comparisons // DONE
|
|
218
|
+
|
|
219
|
+
"no-new-func": 1, //disallow `new` operators with the `Function` object // DONE
|
|
220
|
+
|
|
221
|
+
"no-new-object": 1, //disallow `Object` constructors // DONE
|
|
222
|
+
|
|
223
|
+
"no-new-wrappers": 1, //disallow `new` operators with the `String`, `Number`, and `Boolean` objects // DONE
|
|
224
|
+
|
|
225
|
+
"no-nonoctal-decimal-escape": 1, //disallow `\8` and `\9` escape sequences in string literals // DONE
|
|
226
|
+
|
|
227
|
+
"no-octal": 1, //disallow octal literals // DONE
|
|
228
|
+
|
|
229
|
+
"no-octal-escape": 1, //disallow octal escape sequences in string literals // DONE
|
|
230
|
+
|
|
231
|
+
"no-param-reassign": 1, //disallow reassigning `function` parameters // DONE
|
|
232
|
+
|
|
233
|
+
"no-plusplus": 1, //disallow the unary operators `++` and `--` // DONE
|
|
234
|
+
|
|
235
|
+
"no-proto": 1, //disallow the use of the `__proto__` property // DONE
|
|
236
|
+
|
|
237
|
+
"no-redeclare": 1, //disallow variable redeclaration // DONE
|
|
238
|
+
|
|
239
|
+
"no-regex-spaces": 1, //disallow multiple spaces in regular expressions // DONE
|
|
240
|
+
|
|
241
|
+
"no-restricted-exports": 1, //disallow specified names in exports // DONE
|
|
242
|
+
|
|
243
|
+
"no-restricted-globals": 1, //disallow specified global variables // DONE
|
|
244
|
+
|
|
245
|
+
"no-restricted-imports": 1, //disallow specified modules when loaded by `import` // DONE
|
|
246
|
+
|
|
247
|
+
"no-restricted-properties": 1, //disallow certain properties on certain objects // DONE
|
|
248
|
+
|
|
249
|
+
"no-restricted-syntax": 1, //disallow specified syntax // DONE
|
|
250
|
+
|
|
251
|
+
"no-return-assign": 1, //disallow assignment operators in `return` statements // DONE
|
|
252
|
+
|
|
253
|
+
"no-return-await": 1, //disallow unnecessary `return await` // DONE
|
|
254
|
+
|
|
255
|
+
"no-script-url": 1, //disallow `javascript:` urls // DONE
|
|
256
|
+
|
|
257
|
+
"no-sequences": 1, //disallow comma operators // DONE
|
|
258
|
+
|
|
259
|
+
"no-shadow": 0, //disallow variable declarations from shadowing variables declared in the outer scope // DONE
|
|
260
|
+
|
|
261
|
+
"no-shadow-restricted-names": 1, //disallow identifiers from shadowing restricted names // DONE
|
|
262
|
+
|
|
263
|
+
"no-ternary": 0, //disallow ternary operators // DONE - OFF
|
|
264
|
+
|
|
265
|
+
"no-throw-literal": 1, //disallow throwing literals as exceptions // DONE
|
|
266
|
+
|
|
267
|
+
"no-undef-init": 1, //disallow initializing variables to `undefined` // DONE
|
|
268
|
+
|
|
269
|
+
"no-undefined": 0, //disallow the use of `undefined` as an identifier // DONE
|
|
270
|
+
|
|
271
|
+
"no-underscore-dangle": 0, //disallow dangling underscores in identifiers // DONE
|
|
272
|
+
|
|
273
|
+
"no-unneeded-ternary": 0, //disallow ternary operators when simpler alternatives exist // DONE - OFF
|
|
274
|
+
|
|
275
|
+
"no-unused-expressions": 0, //disallow unused expressions // DONE - OFF
|
|
276
|
+
|
|
277
|
+
"no-unused-labels": 1, //disallow unused labels // DONE
|
|
278
|
+
|
|
279
|
+
"no-useless-call": 1, //disallow unnecessary calls to `.call()` and `.apply()` // DONE
|
|
280
|
+
|
|
281
|
+
"no-useless-catch": 1, //disallow unnecessary `catch` clauses // DONE
|
|
282
|
+
|
|
283
|
+
"no-useless-computed-key": 1, //disallow unnecessary computed property keys in objects and classes // DONE
|
|
284
|
+
|
|
285
|
+
"no-useless-concat": 1, //disallow unnecessary concatenation of literals or template literals // DONE
|
|
286
|
+
|
|
287
|
+
"no-useless-constructor": 0, //disallow unnecessary constructors // DONE
|
|
288
|
+
|
|
289
|
+
"no-useless-escape": 1, //disallow unnecessary escape characters // DONE
|
|
290
|
+
|
|
291
|
+
"no-useless-rename": 1, //disallow renaming import, export, and destructured assignments to the same name // DONE
|
|
292
|
+
|
|
293
|
+
"no-useless-return": 1, //disallow redundant return statements // DONE
|
|
294
|
+
|
|
295
|
+
"no-var": 1, //require `let` or `const` instead of `var` // DONE
|
|
296
|
+
|
|
297
|
+
"no-void": ["error", { "allowAsStatement": true }], //disallow `void` operators // DONE - CUSTOMISED
|
|
298
|
+
|
|
299
|
+
"no-warning-comments": 1, //disallow specified warning terms in comments // DONE
|
|
300
|
+
|
|
301
|
+
"no-with": 1, //disallow `with` statements // DONE
|
|
302
|
+
|
|
303
|
+
"object-shorthand": 0, //require or disallow method and property shorthand syntax for object literals // DONE
|
|
304
|
+
|
|
305
|
+
"one-var": 0, //enforce variables to be declared either together or separately in functions // DONE
|
|
306
|
+
|
|
307
|
+
"one-var-declaration-per-line": 1, //require or disallow newlines around variable declarations // DONE
|
|
308
|
+
|
|
309
|
+
"operator-assignment": 1, //require or disallow assignment operator shorthand where possible // DONE
|
|
310
|
+
|
|
311
|
+
"prefer-arrow-callback": 1, //require using arrow functions for callbacks // DONE
|
|
312
|
+
|
|
313
|
+
"prefer-const": 1, //require `const` declarations for variables that are never reassigned after declared // DONE
|
|
314
|
+
|
|
315
|
+
"prefer-destructuring": 0, //require destructuring from arrays and/or objects // DONE - OFF
|
|
316
|
+
|
|
317
|
+
"prefer-exponentiation-operator": 1, //disallow the use of `Math.pow` in favor of the `**` operator // DONE
|
|
318
|
+
|
|
319
|
+
"prefer-named-capture-group": 1, //enforce using named capture group in regular expression // DONE
|
|
320
|
+
|
|
321
|
+
"prefer-numeric-literals": 1, //disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals // DONE
|
|
322
|
+
|
|
323
|
+
"prefer-object-spread": 1, //disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead. // DONE
|
|
324
|
+
|
|
325
|
+
"prefer-promise-reject-errors": 1, //require using Error objects as Promise rejection reasons // DONE
|
|
326
|
+
|
|
327
|
+
"prefer-regex-literals": 1, //disallow use of the `RegExp` constructor in favor of regular expression literals // DONE
|
|
328
|
+
|
|
329
|
+
"prefer-rest-params": 1, //require rest parameters instead of `arguments` // DONE
|
|
330
|
+
|
|
331
|
+
"prefer-spread": 1, //require spread operators instead of `.apply()` // DONE
|
|
332
|
+
|
|
333
|
+
"prefer-template": 1, //require template literals instead of string concatenation // DONE
|
|
334
|
+
|
|
335
|
+
"quote-props": 0, //require quotes around object literal property names // DONE
|
|
336
|
+
|
|
337
|
+
"radix": 1, //enforce the consistent use of the radix argument when using `parseInt()` // DONE
|
|
338
|
+
|
|
339
|
+
"require-await": 1, //disallow async functions which have no `await` expression // DONE
|
|
340
|
+
|
|
341
|
+
"require-unicode-regexp": 1, //enforce the use of `u` flag on RegExp // DONE
|
|
342
|
+
|
|
343
|
+
"require-yield": 1, //require generator functions to contain `yield` // DONE
|
|
344
|
+
|
|
345
|
+
"sort-imports": 1, //enforce sorted import declarations within modules // DONE
|
|
346
|
+
|
|
347
|
+
"sort-keys": 0, //require object keys to be sorted // DONE
|
|
348
|
+
|
|
349
|
+
"sort-vars": 1, //require variables within the same declaration block to be sorted // DONE
|
|
350
|
+
|
|
351
|
+
"spaced-comment": 1, //enforce consistent spacing after the `//` or `/*` in a comment // DONE
|
|
352
|
+
|
|
353
|
+
"strict": 1, //require or disallow strict mode directives // DONE
|
|
354
|
+
|
|
355
|
+
"symbol-description": 1, //require symbol descriptions // DONE
|
|
356
|
+
|
|
357
|
+
"vars-on-top": 1, //require `var` declarations be placed at the top of their containing scope // DONE
|
|
358
|
+
|
|
359
|
+
"yoda": 1, //require or disallow "Yoda" conditions // DONE
|
|
360
|
+
|
|
361
|
+
// Layout & Formatting: https://eslint.org/docs/rules/
|
|
362
|
+
|
|
363
|
+
"array-bracket-newline": 1, // enforce linebreaks after opening and before closing array brackets // DONE
|
|
364
|
+
|
|
365
|
+
"array-bracket-spacing": 1, // enforce consistent spacing inside array brackets // DONE
|
|
366
|
+
|
|
367
|
+
"array-element-newline": 0, // enforce line breaks after each array element // DONE - OFF
|
|
368
|
+
|
|
369
|
+
"arrow-parens": 1, // require parentheses around arrow function arguments // DONE
|
|
370
|
+
|
|
371
|
+
"arrow-spacing": 1, // enforce consistent spacing before and after the arrow in arrow functions // DONE
|
|
372
|
+
|
|
373
|
+
"block-spacing": 1, // disallow or enforce spaces inside of blocks after opening block and before closing block // DONE
|
|
374
|
+
|
|
375
|
+
"brace-style": 1, // enforce consistent brace style for blocks // DONE
|
|
376
|
+
|
|
377
|
+
"comma-dangle": 1, // require or disallow trailing commas // DONE
|
|
378
|
+
|
|
379
|
+
"comma-spacing": 1, // enforce consistent spacing before and after commas // DONE
|
|
380
|
+
|
|
381
|
+
"comma-style": 1, // enforce consistent comma style // DONE
|
|
382
|
+
|
|
383
|
+
"computed-property-spacing": 1, // enforce consistent spacing inside computed property brackets // DONE
|
|
384
|
+
|
|
385
|
+
"dot-location": 0, // enforce consistent newlines before and after dots // DONE
|
|
386
|
+
|
|
387
|
+
"eol-last": 1, // require or disallow newline at the end of files // DONE
|
|
388
|
+
|
|
389
|
+
"func-call-spacing": 1, // require or disallow spacing between function identifiers and their invocations // DONE
|
|
390
|
+
|
|
391
|
+
"function-call-argument-newline": ["warn", "consistent"], // enforce line breaks between arguments of a function call // DONE - CUSTOMISED
|
|
392
|
+
|
|
393
|
+
"function-paren-newline": ["warn", "multiline-arguments"], // enforce consistent line breaks inside function parentheses // DONE
|
|
394
|
+
|
|
395
|
+
"generator-star-spacing": 1, // enforce consistent spacing around `*` operators in generator functions // DONE
|
|
396
|
+
|
|
397
|
+
"implicit-arrow-linebreak": 1, // enforce the location of arrow function bodies // DONE
|
|
398
|
+
|
|
399
|
+
"indent": ["warn", 2], // enforce consistent indentation. second value is number of spaces // DONE
|
|
400
|
+
|
|
401
|
+
"jsx-quotes": 1, // enforce the consistent use of either double or single quotes in JSX attributes // DONE
|
|
402
|
+
|
|
403
|
+
"key-spacing": 1, // enforce consistent spacing between keys and values in object literal properties // DONE
|
|
404
|
+
|
|
405
|
+
"keyword-spacing": 1, // enforce consistent spacing before and after keywords // DONE
|
|
406
|
+
|
|
407
|
+
"line-comment-position": 1, // enforce position of line comments // DONE
|
|
408
|
+
|
|
409
|
+
"linebreak-style": 0, // enforce consistent linebreak style // OFF
|
|
410
|
+
|
|
411
|
+
"lines-around-comment": 1, // require empty lines around comments // DONE
|
|
412
|
+
|
|
413
|
+
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE
|
|
414
|
+
|
|
415
|
+
"max-len": [
|
|
416
|
+
1,
|
|
417
|
+
{ "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }
|
|
418
|
+
], // enforce a maximum line length // DONE - CUSTOMISED
|
|
419
|
+
|
|
420
|
+
"max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
|
|
421
|
+
|
|
422
|
+
"multiline-ternary": 0, // enforce newlines between operands of ternary expressions // DONE - OFF
|
|
423
|
+
|
|
424
|
+
"new-parens": 1, // enforce or disallow parentheses when invoking a constructor with no arguments // DONE
|
|
425
|
+
|
|
426
|
+
"newline-per-chained-call": 1, // require a newline after each call in a method chain // DONE
|
|
427
|
+
|
|
428
|
+
"no-extra-parens": 0, // disallow unnecessary parentheses // DONE - OFF
|
|
429
|
+
|
|
430
|
+
"no-mixed-spaces-and-tabs": 1, // disallow mixed spaces and tabs for indentation // DONE
|
|
431
|
+
|
|
432
|
+
"no-multi-spaces": 1, // disallow multiple spaces // DONE
|
|
433
|
+
|
|
434
|
+
"no-multiple-empty-lines": 1, // disallow multiple empty lines // DONE
|
|
435
|
+
|
|
436
|
+
"no-tabs": 1, // disallow all tabs // DONE
|
|
437
|
+
|
|
438
|
+
"no-trailing-spaces": 1, // disallow trailing whitespace at the end of lines // DONE
|
|
439
|
+
|
|
440
|
+
"no-whitespace-before-property": 1, // disallow whitespace before properties // DONE
|
|
441
|
+
|
|
442
|
+
"nonblock-statement-body-position": 1, // enforce the location of single-line statements // DONE
|
|
443
|
+
|
|
444
|
+
"object-curly-newline": 1, // enforce consistent line breaks after opening and before closing braces // DONE
|
|
445
|
+
|
|
446
|
+
"object-curly-spacing": ["warn", "always"], // enforce consistent spacing inside braces // DONE
|
|
447
|
+
|
|
448
|
+
"object-property-newline": 0, // enforce placing object properties on separate lines // DONE - OFF
|
|
449
|
+
|
|
450
|
+
"operator-linebreak": 1, // enforce consistent linebreak style for operators // DONE
|
|
451
|
+
|
|
452
|
+
"padded-blocks": 0, // require or disallow padding within blocks // DONE
|
|
453
|
+
|
|
454
|
+
"padding-line-between-statements": 1, // require or disallow padding lines between statements // DONE
|
|
455
|
+
|
|
456
|
+
"quotes": ["warn", "single"], // enforce the consistent use of either backticks, double, or single quotes // DONE
|
|
457
|
+
|
|
458
|
+
"rest-spread-spacing": 1, // enforce spacing between rest and spread operators and their expressions // DONE
|
|
459
|
+
|
|
460
|
+
"semi": 1, // require or disallow semicolons instead of ASI // DONE
|
|
461
|
+
|
|
462
|
+
"semi-spacing": 1, // enforce consistent spacing before and after semicolons // DONE
|
|
463
|
+
|
|
464
|
+
"semi-style": 1, // enforce location of semicolons // DONE
|
|
465
|
+
|
|
466
|
+
"space-before-blocks": 1, // enforce consistent spacing before blocks // DONE
|
|
467
|
+
|
|
468
|
+
"space-before-function-paren": 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE
|
|
469
|
+
|
|
470
|
+
"space-in-parens": 1, // enforce consistent spacing inside parentheses // DONE
|
|
471
|
+
|
|
472
|
+
"space-infix-ops": 1, // require spacing around infix operators // DONE
|
|
473
|
+
|
|
474
|
+
"space-unary-ops": 1, // enforce consistent spacing before or after unary operators // DONE
|
|
475
|
+
|
|
476
|
+
"switch-colon-spacing": 1, // enforce spacing around colons of switch statements // DONE
|
|
477
|
+
|
|
478
|
+
"template-curly-spacing": 1, // require or disallow spacing around embedded expressions of template strings // DONE
|
|
479
|
+
|
|
480
|
+
"template-tag-spacing": 1, // require or disallow spacing between template tags and their literals // DONE
|
|
481
|
+
|
|
482
|
+
"unicode-bom": 1, // require or disallow Unicode byte order mark (BOM) // DONE
|
|
483
|
+
|
|
484
|
+
"wrap-iife": 1, // require parentheses around immediate `function` invocations // DONE
|
|
485
|
+
|
|
486
|
+
"wrap-regex": 1, // require parenthesis around regex literals // DONE
|
|
487
|
+
|
|
488
|
+
"yield-star-spacing": 1 // require or disallow spacing around the `*` in `yield*` expressions // DONE
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
]
|
|
492
|
+
}
|
package/README.md
ADDED
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wildpastry/eslint-config",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "ESLint configuration file",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/WildPastry/ESLintConfig.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"eslint",
|
|
15
|
+
"eslint-config"
|
|
16
|
+
],
|
|
17
|
+
"author": "WildPastry",
|
|
18
|
+
"license": "UNLICENSED",
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"eslint": ">= 3"
|
|
21
|
+
}
|
|
22
|
+
}
|