@perfective/eslint-config 0.29.1 → 0.30.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/LICENSE +1 -1
- package/README.adoc +24 -19
- package/README.md +20 -17
- package/config/node.d.ts +7 -0
- package/config/node.js +7 -11
- package/config/plugin.d.ts +9 -0
- package/config/plugin.js +22 -26
- package/config.js +1 -6
- package/cypress.d.ts +5 -0
- package/cypress.js +31 -58
- package/index.d.ts +58 -26
- package/index.js +100 -145
- package/jest-dom.js +8 -11
- package/jest.d.ts +6 -0
- package/jest.js +29 -24
- package/package.json +18 -18
- package/rules/array-func/index.d.ts +1 -2
- package/rules/array-func/index.js +14 -50
- package/rules/cypress/index.d.ts +11 -3
- package/rules/cypress/index.js +23 -57
- package/rules/eslint/index.js +6 -9
- package/rules/eslint/layout-formatting.js +64 -67
- package/rules/eslint/possible-problems.js +96 -99
- package/rules/eslint/suggestions.js +181 -182
- package/rules/eslint-comments/best-practices.js +8 -11
- package/rules/eslint-comments/index.d.ts +1 -2
- package/rules/eslint-comments/index.js +9 -45
- package/rules/eslint-comments/stylistic-issues.js +9 -18
- package/rules/import/helpful-warnings.js +11 -14
- package/rules/import/index.js +11 -14
- package/rules/import/module-systems.js +10 -13
- package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
- package/rules/import/rules/no-extraneous-dependencies.js +20 -21
- package/rules/import/static-analysis.js +26 -29
- package/rules/import/style-guide.js +33 -36
- package/rules/jest/index.js +98 -72
- package/rules/jest/typescript-eslint.js +5 -8
- package/rules/jest-dom/index.js +19 -55
- package/rules/jsdoc/index.d.ts +1 -1
- package/rules/jsdoc/index.js +158 -344
- package/rules/n/index.d.ts +1 -1
- package/rules/n/index.js +64 -98
- package/rules/prefer-arrow/index.d.ts +1 -2
- package/rules/prefer-arrow/index.js +14 -50
- package/rules/promise/index.d.ts +1 -2
- package/rules/promise/index.js +35 -73
- package/rules/rxjs/index.d.ts +1 -1
- package/rules/rxjs/index.js +60 -96
- package/rules/security/index.d.ts +1 -2
- package/rules/security/index.js +22 -58
- package/rules/simple-import-sort/index.js +12 -48
- package/rules/simple-import-sort/rules/imports.d.ts +11 -0
- package/rules/simple-import-sort/rules/imports.js +18 -32
- package/rules/stylistic/js/index.d.ts +9 -2
- package/rules/stylistic/js/index.js +198 -236
- package/rules/stylistic/jsx/index.d.ts +8 -2
- package/rules/stylistic/jsx/index.js +81 -117
- package/rules/stylistic/plus/index.d.ts +6 -2
- package/rules/stylistic/plus/index.js +14 -50
- package/rules/stylistic/ts/index.d.ts +8 -2
- package/rules/stylistic/ts/index.js +135 -169
- package/rules/testing-library/index.js +41 -77
- package/rules/typescript-eslint/extension-rules.js +113 -116
- package/rules/typescript-eslint/index.d.ts +2 -0
- package/rules/typescript-eslint/index.js +9 -45
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
- package/rules/typescript-eslint/supported-rules.d.ts +2 -0
- package/rules/typescript-eslint/supported-rules.js +256 -319
- package/rules/unicorn/index.d.ts +7 -2
- package/rules/unicorn/index.js +178 -209
- package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
- package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
- package/rules.js +4 -14
- package/rxjs.d.ts +5 -0
- package/rxjs.js +21 -57
- package/testing-library.js +8 -11
|
@@ -1,67 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
'wrap-regex': 'off',
|
|
66
|
-
'yield-star-spacing': 'off',
|
|
67
|
-
};
|
|
1
|
+
export const eslintLayoutFormattingRules = {
|
|
2
|
+
'array-bracket-newline': 'off',
|
|
3
|
+
'array-bracket-spacing': 'off',
|
|
4
|
+
'array-element-newline': 'off',
|
|
5
|
+
'arrow-parens': 'off',
|
|
6
|
+
'arrow-spacing': 'off',
|
|
7
|
+
'block-spacing': 'off',
|
|
8
|
+
'brace-style': 'off',
|
|
9
|
+
'comma-dangle': 'off',
|
|
10
|
+
'comma-spacing': 'off',
|
|
11
|
+
'comma-style': 'off',
|
|
12
|
+
'computed-property-spacing': 'off',
|
|
13
|
+
'dot-location': 'off',
|
|
14
|
+
'eol-last': 'off',
|
|
15
|
+
'func-call-spacing': 'off',
|
|
16
|
+
'function-call-argument-newline': 'off',
|
|
17
|
+
'function-paren-newline': 'off',
|
|
18
|
+
'generator-star-spacing': 'off',
|
|
19
|
+
'implicit-arrow-linebreak': 'off',
|
|
20
|
+
'indent': 'off',
|
|
21
|
+
'jsx-quotes': 'off',
|
|
22
|
+
'key-spacing': 'off',
|
|
23
|
+
'keyword-spacing': 'off',
|
|
24
|
+
'line-comment-position': 'off',
|
|
25
|
+
'linebreak-style': 'off',
|
|
26
|
+
'lines-around-comment': 'off',
|
|
27
|
+
'lines-between-class-members': 'off',
|
|
28
|
+
'max-len': 'off',
|
|
29
|
+
'max-statements-per-line': 'off',
|
|
30
|
+
'multiline-ternary': 'off',
|
|
31
|
+
'new-parens': 'off',
|
|
32
|
+
'newline-per-chained-call': 'off',
|
|
33
|
+
'no-extra-parens': 'off',
|
|
34
|
+
'no-mixed-spaces-and-tabs': 'off',
|
|
35
|
+
'no-multi-spaces': 'off',
|
|
36
|
+
'no-multiple-empty-lines': 'off',
|
|
37
|
+
'no-tabs': 'off',
|
|
38
|
+
'no-trailing-spaces': 'off',
|
|
39
|
+
'no-whitespace-before-property': 'off',
|
|
40
|
+
'nonblock-statement-body-position': 'off',
|
|
41
|
+
'object-curly-newline': 'off',
|
|
42
|
+
'object-curly-spacing': 'off',
|
|
43
|
+
'object-property-newline': 'off',
|
|
44
|
+
'operator-linebreak': 'off',
|
|
45
|
+
'padded-blocks': 'off',
|
|
46
|
+
'padding-line-between-statements': 'off',
|
|
47
|
+
'quotes': 'off',
|
|
48
|
+
'rest-spread-spacing': 'off',
|
|
49
|
+
'semi': 'off',
|
|
50
|
+
'semi-spacing': 'off',
|
|
51
|
+
'semi-style': 'off',
|
|
52
|
+
'space-before-blocks': 'off',
|
|
53
|
+
'space-before-function-paren': 'off',
|
|
54
|
+
'space-in-parens': 'off',
|
|
55
|
+
'space-infix-ops': 'off',
|
|
56
|
+
'space-unary-ops': 'off',
|
|
57
|
+
'switch-colon-spacing': 'off',
|
|
58
|
+
'template-curly-spacing': 'off',
|
|
59
|
+
'template-tag-spacing': 'off',
|
|
60
|
+
'unicode-bom': ['warn', 'never'],
|
|
61
|
+
'wrap-iife': 'off',
|
|
62
|
+
'wrap-regex': 'off',
|
|
63
|
+
'yield-star-spacing': 'off'
|
|
64
|
+
};
|
|
@@ -1,99 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
requireStringLiterals: true,
|
|
98
|
-
}],
|
|
99
|
-
};
|
|
1
|
+
export const eslintPossibleProblemsRules = {
|
|
2
|
+
'array-callback-return': ['error', {
|
|
3
|
+
allowImplicit: true,
|
|
4
|
+
checkForEach: false,
|
|
5
|
+
allowVoid: false
|
|
6
|
+
}],
|
|
7
|
+
'constructor-super': 'error',
|
|
8
|
+
'for-direction': 'error',
|
|
9
|
+
'getter-return': 'error',
|
|
10
|
+
'no-async-promise-executor': 'error',
|
|
11
|
+
'no-await-in-loop': 'error',
|
|
12
|
+
'no-class-assign': 'error',
|
|
13
|
+
'no-compare-neg-zero': 'error',
|
|
14
|
+
'no-cond-assign': ['error', 'always'],
|
|
15
|
+
'no-const-assign': 'error',
|
|
16
|
+
'no-constant-binary-expression': 'error',
|
|
17
|
+
'no-constant-condition': 'error',
|
|
18
|
+
'no-constructor-return': 'error',
|
|
19
|
+
'no-control-regex': 'error',
|
|
20
|
+
'no-debugger': 'error',
|
|
21
|
+
'no-dupe-args': 'error',
|
|
22
|
+
'no-dupe-class-members': 'error',
|
|
23
|
+
'no-dupe-else-if': 'error',
|
|
24
|
+
'no-dupe-keys': 'error',
|
|
25
|
+
'no-duplicate-case': 'error',
|
|
26
|
+
'no-duplicate-imports': ['off', {
|
|
27
|
+
includeExports: true
|
|
28
|
+
}],
|
|
29
|
+
'no-empty-character-class': 'error',
|
|
30
|
+
'no-empty-pattern': 'error',
|
|
31
|
+
'no-ex-assign': 'error',
|
|
32
|
+
'no-fallthrough': ['error', {
|
|
33
|
+
allowEmptyCase: false,
|
|
34
|
+
reportUnusedFallthroughComment: true
|
|
35
|
+
}],
|
|
36
|
+
'no-func-assign': 'error',
|
|
37
|
+
'no-import-assign': 'error',
|
|
38
|
+
'no-inner-declarations': 'error',
|
|
39
|
+
'no-invalid-regexp': 'error',
|
|
40
|
+
'no-irregular-whitespace': ['error', {
|
|
41
|
+
skipStrings: false,
|
|
42
|
+
skipComments: false,
|
|
43
|
+
skipRegExps: false,
|
|
44
|
+
skipTemplates: false,
|
|
45
|
+
skipJSXText: false
|
|
46
|
+
}],
|
|
47
|
+
'no-loss-of-precision': 'error',
|
|
48
|
+
'no-misleading-character-class': ['error', {
|
|
49
|
+
allowEscape: false
|
|
50
|
+
}],
|
|
51
|
+
'no-new-native-nonconstructor': 'error',
|
|
52
|
+
'no-new-symbol': 'error',
|
|
53
|
+
'no-obj-calls': 'error',
|
|
54
|
+
'no-promise-executor-return': 'error',
|
|
55
|
+
'no-prototype-builtins': 'error',
|
|
56
|
+
'no-self-assign': 'error',
|
|
57
|
+
'no-self-compare': 'error',
|
|
58
|
+
'no-setter-return': 'error',
|
|
59
|
+
'no-sparse-arrays': 'error',
|
|
60
|
+
'no-template-curly-in-string': 'error',
|
|
61
|
+
'no-this-before-super': 'error',
|
|
62
|
+
'no-undef': 'off',
|
|
63
|
+
'no-unexpected-multiline': 'error',
|
|
64
|
+
'no-unmodified-loop-condition': 'error',
|
|
65
|
+
'no-unreachable': 'error',
|
|
66
|
+
'no-unreachable-loop': 'error',
|
|
67
|
+
'no-unsafe-finally': 'error',
|
|
68
|
+
'no-unsafe-negation': 'error',
|
|
69
|
+
'no-unsafe-optional-chaining': 'error',
|
|
70
|
+
'no-unused-private-class-members': 'error',
|
|
71
|
+
'no-unused-vars': ['error', {
|
|
72
|
+
args: 'after-used',
|
|
73
|
+
argsIgnorePattern: '^_',
|
|
74
|
+
caughtErrors: 'all',
|
|
75
|
+
destructuredArrayIgnorePattern: '^_',
|
|
76
|
+
ignoreClassWithStaticInitBlock: false,
|
|
77
|
+
ignoreRestSiblings: false,
|
|
78
|
+
reportUsedIgnorePattern: false,
|
|
79
|
+
vars: 'all'
|
|
80
|
+
}],
|
|
81
|
+
'no-use-before-define': ['error', {
|
|
82
|
+
functions: false,
|
|
83
|
+
classes: false,
|
|
84
|
+
variables: false,
|
|
85
|
+
allowNamedExports: false
|
|
86
|
+
}],
|
|
87
|
+
'no-useless-backreference': 'error',
|
|
88
|
+
'no-useless-assignment': 'error',
|
|
89
|
+
'require-atomic-updates': ['error', {
|
|
90
|
+
allowProperties: false
|
|
91
|
+
}],
|
|
92
|
+
'use-isnan': 'error',
|
|
93
|
+
'valid-typeof': ['error', {
|
|
94
|
+
requireStringLiterals: true
|
|
95
|
+
}]
|
|
96
|
+
};
|