@wildpastry/eslint-config 1.2.3 → 1.2.4
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/index.js +44 -45
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4,56 +4,52 @@ module.exports = {
|
|
|
4
4
|
* DONE - CUSTOMISED = Accepted rule but changed default behaviour
|
|
5
5
|
* DONE - OFF = Disabled rule
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
root: true,
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
ignorePatterns: ["cypress/*"],
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
|
17
|
-
],
|
|
11
|
+
extends: [
|
|
12
|
+
"eslint:recommended",
|
|
13
|
+
"plugin:@typescript-eslint/recommended",
|
|
14
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
|
15
|
+
],
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
env: {
|
|
18
|
+
"browser": true,
|
|
19
|
+
"node": true,
|
|
20
|
+
"es6": true
|
|
21
|
+
},
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
plugins: ["react"],
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
files: ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
],
|
|
27
|
+
ecmaFeatures: {
|
|
28
|
+
"arrowFunctions": true,
|
|
29
|
+
"binaryLiterals": true,
|
|
30
|
+
"blockBindings": true,
|
|
31
|
+
"classes": true,
|
|
32
|
+
"defaultParams": true,
|
|
33
|
+
"destructuring": true,
|
|
34
|
+
"forOf": true,
|
|
35
|
+
"generators": true,
|
|
36
|
+
"modules": true,
|
|
37
|
+
"objectLiteralComputedProperties": true,
|
|
38
|
+
"objectLiteralDuplicateProperties": true,
|
|
39
|
+
"objectLiteralShorthandMethods": true,
|
|
40
|
+
"objectLiteralShorthandProperties": true,
|
|
41
|
+
"octalLiterals": true,
|
|
42
|
+
"regexUFlag": true,
|
|
43
|
+
"regexYFlag": true,
|
|
44
|
+
"spread": true,
|
|
45
|
+
"superInFunctions": true,
|
|
46
|
+
"templateStrings": true,
|
|
47
|
+
"unicodeCodePointEscapes": true,
|
|
48
|
+
"globalReturn": true,
|
|
49
|
+
"jsx": true
|
|
50
|
+
},
|
|
55
51
|
|
|
56
|
-
|
|
52
|
+
rules: {
|
|
57
53
|
"no-inferrable-types": 0, // disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean // DONE - OFF
|
|
58
54
|
"no-unsafe-assignment": 0, // disallow assigning a value with type any to variables and properties // DONE - OFF
|
|
59
55
|
"no-unsafe-member-access": 0, //disallow member access on a value with type any // DONE - OFF
|
|
@@ -238,7 +234,10 @@ module.exports = {
|
|
|
238
234
|
"linebreak-style": 0, // enforce consistent linebreak style // OFF
|
|
239
235
|
"lines-around-comment": 1, // require empty lines around comments // DONE
|
|
240
236
|
"lines-between-class-members": 0, // require or disallow an empty line between class members // DONE
|
|
241
|
-
"max-len": [
|
|
237
|
+
"max-len": [
|
|
238
|
+
1,
|
|
239
|
+
{ "code": 140, "ignoreUrls": true, "ignorePattern": "^import .*" }
|
|
240
|
+
], // enforce a maximum line length // DONE - CUSTOMISED
|
|
242
241
|
"max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
|
|
243
242
|
"multiline-ternary": 0, // enforce newlines between operands of ternary expressions // DONE - OFF
|
|
244
243
|
"new-parens": 1, // enforce or disallow parentheses when invoking a constructor with no arguments // DONE
|
|
@@ -304,7 +303,7 @@ module.exports = {
|
|
|
304
303
|
"space-in-brackets": [1, "never"], // require or disallow spaces inside brackets // DONE
|
|
305
304
|
"space-return-throw-case": [1, "always"], // require a space after return, throw, and case // DONE
|
|
306
305
|
"spaced-line-comment": [1, "always"], // require or disallow a space immediately following the // in a line comment // DONE
|
|
307
|
-
|
|
306
|
+
|
|
308
307
|
// React specific
|
|
309
308
|
"react/display-name": 0, // prevent missing displayName in a React component definition // DONE - OFF
|
|
310
309
|
"react/jsx-quotes": [1, "double", "avoid-escape"], // Enforce quote style for JSX attributes // DONE
|