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