@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,182 +1,181 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eslintSuggestionsRules = void 0;
4
- exports.eslintSuggestionsRules = {
5
- 'accessor-pairs': 'error',
6
- 'arrow-body-style': ['warn', 'as-needed'],
7
- 'block-scoped-var': 'error',
8
- 'camelcase': 'off',
9
- 'capitalized-comments': ['warn', 'always', {
10
- ignorePattern: 'eslint|tslint',
11
- ignoreConsecutiveComments: true,
12
- }],
13
- 'class-methods-use-this': 'off',
14
- 'complexity': ['error', 3],
15
- 'consistent-return': 'error',
16
- 'consistent-this': ['error', 'self'],
17
- 'curly': ['warn', 'all'],
18
- 'default-case': 'error',
19
- 'default-case-last': 'error',
20
- 'default-param-last': 'error',
21
- 'dot-notation': ['warn', {
22
- allowKeywords: true,
23
- }],
24
- 'eqeqeq': ['warn', 'always'],
25
- 'func-name-matching': ['error', 'always'],
26
- 'func-names': ['error', 'always'],
27
- 'func-style': ['error', 'declaration'],
28
- 'grouped-accessor-pairs': ['error', 'setBeforeGet'],
29
- 'guard-for-in': 'error',
30
- 'id-denylist': ['error', 'arr', 'ctx', 'el', 'elem', 'err', 'ind', 'ptr'],
31
- 'id-length': 'off',
32
- 'id-match': 'off',
33
- 'init-declarations': ['error', 'always'],
34
- 'logical-assignment-operators': ['warn', 'always', {
35
- enforceForIfStatements: true,
36
- }],
37
- 'max-classes-per-file': ['error', 1],
38
- 'max-depth': ['error', 4],
39
- 'max-lines': 'off',
40
- 'max-lines-per-function': 'off',
41
- 'max-nested-callbacks': ['error', 2],
42
- 'max-params': ['off', {
43
- max: 3,
44
- }],
45
- 'max-statements': ['off', {
46
- max: 10,
47
- }],
48
- 'multiline-comment-style': 'off',
49
- 'new-cap': ['error', {
50
- newIsCap: true,
51
- capIsNew: true,
52
- properties: true,
53
- }],
54
- 'no-alert': 'error',
55
- 'no-array-constructor': 'error',
56
- 'no-bitwise': 'error',
57
- 'no-caller': 'error',
58
- 'no-case-declarations': 'error',
59
- 'no-confusing-arrow': 'off',
60
- 'no-console': 'error',
61
- 'no-continue': 'error',
62
- 'no-delete-var': 'error',
63
- 'no-div-regex': 'warn',
64
- 'no-else-return': ['warn', {
65
- allowElseIf: false,
66
- }],
67
- 'no-empty': 'error',
68
- 'no-empty-function': 'error',
69
- 'no-empty-static-block': 'error',
70
- 'no-eq-null': 'error',
71
- 'no-eval': 'error',
72
- 'no-extend-native': 'error',
73
- 'no-extra-bind': 'warn',
74
- 'no-extra-boolean-cast': ['warn', {
75
- enforceForInnerExpressions: true,
76
- }],
77
- 'no-extra-label': 'warn',
78
- 'no-extra-semi': 'off',
79
- 'no-floating-decimal': 'off',
80
- 'no-global-assign': 'error',
81
- 'no-implicit-coercion': 'warn',
82
- 'no-implicit-globals': 'error',
83
- 'no-implied-eval': 'error',
84
- 'no-inline-comments': ['error', {
85
- ignorePattern: '^ == .+',
86
- }],
87
- 'no-invalid-this': 'error',
88
- 'no-iterator': 'error',
89
- 'no-label-var': 'error',
90
- 'no-labels': 'error',
91
- 'no-lone-blocks': 'error',
92
- 'no-lonely-if': 'warn',
93
- 'no-loop-func': 'error',
94
- 'no-magic-numbers': 'off',
95
- 'no-mixed-operators': 'off',
96
- 'no-multi-assign': 'error',
97
- 'no-multi-str': 'error',
98
- 'no-negated-condition': 'off',
99
- 'no-nested-ternary': 'error',
100
- 'no-new': 'error',
101
- 'no-new-func': 'error',
102
- 'no-new-object': 'off',
103
- 'no-new-wrappers': 'error',
104
- 'no-nonoctal-decimal-escape': 'error',
105
- 'no-object-constructor': 'error',
106
- 'no-octal': 'error',
107
- 'no-octal-escape': 'error',
108
- 'no-param-reassign': 'error',
109
- 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
110
- 'no-proto': 'error',
111
- 'no-redeclare': 'error',
112
- 'no-regex-spaces': 'warn',
113
- 'no-restricted-exports': 'off',
114
- 'no-restricted-globals': 'error',
115
- 'no-restricted-imports': 'error',
116
- 'no-restricted-properties': 'error',
117
- 'no-restricted-syntax': ['error', 'ForInStatement'],
118
- 'no-return-assign': 'error',
119
- 'no-script-url': 'error',
120
- 'no-sequences': ['error', {
121
- allowInParentheses: false,
122
- }],
123
- 'no-shadow': 'off',
124
- 'no-shadow-restricted-names': 'error',
125
- 'no-ternary': 'off',
126
- 'no-throw-literal': 'error',
127
- 'no-undef-init': 'warn',
128
- 'no-undefined': 'off',
129
- 'no-underscore-dangle': ['error', {
130
- allowAfterSuper: false,
131
- allowAfterThis: true,
132
- allowAfterThisConstructor: false,
133
- allowFunctionParams: true,
134
- enforceInMethodNames: true,
135
- enforceInClassFields: true,
136
- }],
137
- 'no-unneeded-ternary': 'warn',
138
- 'no-unused-expressions': 'error',
139
- 'no-unused-labels': 'warn',
140
- 'no-useless-call': 'error',
141
- 'no-useless-catch': 'error',
142
- 'no-useless-computed-key': 'warn',
143
- 'no-useless-concat': 'error',
144
- 'no-useless-constructor': 'error',
145
- 'no-useless-escape': 'error',
146
- 'no-useless-rename': 'warn',
147
- 'no-useless-return': 'warn',
148
- 'no-var': 'warn',
149
- 'no-void': 'error',
150
- 'no-warning-comments': 'off',
151
- 'no-with': 'error',
152
- 'object-shorthand': ['warn', 'always'],
153
- 'one-var': ['warn', 'never'],
154
- 'one-var-declaration-per-line': 'off',
155
- 'operator-assignment': ['warn', 'always'],
156
- 'prefer-arrow-callback': 'warn',
157
- 'prefer-const': 'warn',
158
- 'prefer-destructuring': 'off',
159
- 'prefer-exponentiation-operator': 'warn',
160
- 'prefer-named-capture-group': 'off',
161
- 'prefer-numeric-literals': 'warn',
162
- 'prefer-object-has-own': 'off',
163
- 'prefer-object-spread': 'warn',
164
- 'prefer-promise-reject-errors': 'error',
165
- 'prefer-regex-literals': 'off',
166
- 'prefer-rest-params': 'error',
167
- 'prefer-spread': 'error',
168
- 'prefer-template': 'warn',
169
- 'quote-props': 'off',
170
- 'radix': 'error',
171
- 'require-await': 'error',
172
- 'require-unicode-regexp': 'error',
173
- 'require-yield': 'error',
174
- 'sort-imports': 'off',
175
- 'sort-keys': 'off',
176
- 'sort-vars': 'off',
177
- 'spaced-comment': 'off',
178
- 'strict': 'warn',
179
- 'symbol-description': 'error',
180
- 'vars-on-top': 'error',
181
- 'yoda': ['warn', 'never'],
182
- };
1
+ export const eslintSuggestionsRules = {
2
+ 'accessor-pairs': 'error',
3
+ 'arrow-body-style': ['warn', 'as-needed'],
4
+ 'block-scoped-var': 'error',
5
+ 'camelcase': 'off',
6
+ 'capitalized-comments': ['warn', 'always', {
7
+ ignorePattern: 'eslint|tslint',
8
+ ignoreConsecutiveComments: true
9
+ }],
10
+ 'class-methods-use-this': 'off',
11
+ 'complexity': ['error', 3],
12
+ 'consistent-return': 'error',
13
+ 'consistent-this': ['error', 'self'],
14
+ 'curly': ['warn', 'all'],
15
+ 'default-case': 'error',
16
+ 'default-case-last': 'error',
17
+ 'default-param-last': 'error',
18
+ 'dot-notation': ['warn', {
19
+ allowKeywords: true
20
+ }],
21
+ 'eqeqeq': ['warn', 'always'],
22
+ 'func-name-matching': ['error', 'always'],
23
+ 'func-names': ['error', 'always'],
24
+ 'func-style': ['error', 'declaration'],
25
+ 'grouped-accessor-pairs': ['error', 'setBeforeGet'],
26
+ 'guard-for-in': 'error',
27
+ 'id-denylist': ['error', 'arr', 'ctx', 'el', 'elem', 'err', 'ind', 'ptr'],
28
+ 'id-length': 'off',
29
+ 'id-match': 'off',
30
+ 'init-declarations': ['error', 'always'],
31
+ 'logical-assignment-operators': ['warn', 'always', {
32
+ enforceForIfStatements: true
33
+ }],
34
+ 'max-classes-per-file': ['error', 1],
35
+ 'max-depth': ['error', 4],
36
+ 'max-lines': 'off',
37
+ 'max-lines-per-function': 'off',
38
+ 'max-nested-callbacks': ['error', 2],
39
+ 'max-params': ['off', {
40
+ max: 3
41
+ }],
42
+ 'max-statements': ['off', {
43
+ max: 10
44
+ }],
45
+ 'multiline-comment-style': 'off',
46
+ 'new-cap': ['error', {
47
+ newIsCap: true,
48
+ capIsNew: true,
49
+ properties: true
50
+ }],
51
+ 'no-alert': 'error',
52
+ 'no-array-constructor': 'error',
53
+ 'no-bitwise': 'error',
54
+ 'no-caller': 'error',
55
+ 'no-case-declarations': 'error',
56
+ 'no-confusing-arrow': 'off',
57
+ 'no-console': 'error',
58
+ 'no-continue': 'error',
59
+ 'no-delete-var': 'error',
60
+ 'no-div-regex': 'warn',
61
+ 'no-else-return': ['warn', {
62
+ allowElseIf: false
63
+ }],
64
+ 'no-empty': 'error',
65
+ 'no-empty-function': 'error',
66
+ 'no-empty-static-block': 'error',
67
+ 'no-eq-null': 'error',
68
+ 'no-eval': 'error',
69
+ 'no-extend-native': 'error',
70
+ 'no-extra-bind': 'warn',
71
+ 'no-extra-boolean-cast': ['warn', {
72
+ enforceForInnerExpressions: true
73
+ }],
74
+ 'no-extra-label': 'warn',
75
+ 'no-extra-semi': 'off',
76
+ 'no-floating-decimal': 'off',
77
+ 'no-global-assign': 'error',
78
+ 'no-implicit-coercion': 'warn',
79
+ 'no-implicit-globals': 'error',
80
+ 'no-implied-eval': 'error',
81
+ 'no-inline-comments': ['error', {
82
+ ignorePattern: '^ == .+'
83
+ }],
84
+ 'no-invalid-this': 'error',
85
+ 'no-iterator': 'error',
86
+ 'no-label-var': 'error',
87
+ 'no-labels': 'error',
88
+ 'no-lone-blocks': 'error',
89
+ 'no-lonely-if': 'warn',
90
+ 'no-loop-func': 'error',
91
+ 'no-magic-numbers': 'off',
92
+ 'no-mixed-operators': 'off',
93
+ 'no-multi-assign': 'error',
94
+ 'no-multi-str': 'error',
95
+ 'no-negated-condition': 'off',
96
+ 'no-nested-ternary': 'error',
97
+ 'no-new': 'error',
98
+ 'no-new-func': 'error',
99
+ 'no-new-object': 'off',
100
+ 'no-new-wrappers': 'error',
101
+ 'no-nonoctal-decimal-escape': 'error',
102
+ 'no-object-constructor': 'error',
103
+ 'no-octal': 'error',
104
+ 'no-octal-escape': 'error',
105
+ 'no-param-reassign': 'error',
106
+ 'no-plusplus': ['error', {
107
+ allowForLoopAfterthoughts: true
108
+ }],
109
+ 'no-proto': 'error',
110
+ 'no-redeclare': 'error',
111
+ 'no-regex-spaces': 'warn',
112
+ 'no-restricted-exports': 'off',
113
+ 'no-restricted-globals': 'error',
114
+ 'no-restricted-imports': 'error',
115
+ 'no-restricted-properties': 'error',
116
+ 'no-restricted-syntax': ['error', 'ForInStatement'],
117
+ 'no-return-assign': 'error',
118
+ 'no-script-url': 'error',
119
+ 'no-sequences': ['error', {
120
+ allowInParentheses: false
121
+ }],
122
+ 'no-shadow': 'off',
123
+ 'no-shadow-restricted-names': 'error',
124
+ 'no-ternary': 'off',
125
+ 'no-throw-literal': 'error',
126
+ 'no-undef-init': 'warn',
127
+ 'no-undefined': 'off',
128
+ 'no-underscore-dangle': ['error', {
129
+ allowAfterSuper: false,
130
+ allowAfterThis: true,
131
+ allowAfterThisConstructor: false,
132
+ allowFunctionParams: true,
133
+ enforceInMethodNames: true,
134
+ enforceInClassFields: true
135
+ }],
136
+ 'no-unneeded-ternary': 'warn',
137
+ 'no-unused-expressions': 'error',
138
+ 'no-unused-labels': 'warn',
139
+ 'no-useless-call': 'error',
140
+ 'no-useless-catch': 'error',
141
+ 'no-useless-computed-key': 'warn',
142
+ 'no-useless-concat': 'error',
143
+ 'no-useless-constructor': 'error',
144
+ 'no-useless-escape': 'error',
145
+ 'no-useless-rename': 'warn',
146
+ 'no-useless-return': 'warn',
147
+ 'no-var': 'warn',
148
+ 'no-void': 'error',
149
+ 'no-warning-comments': 'off',
150
+ 'no-with': 'error',
151
+ 'object-shorthand': ['warn', 'always'],
152
+ 'one-var': ['warn', 'never'],
153
+ 'one-var-declaration-per-line': 'off',
154
+ 'operator-assignment': ['warn', 'always'],
155
+ 'prefer-arrow-callback': 'warn',
156
+ 'prefer-const': 'warn',
157
+ 'prefer-destructuring': 'off',
158
+ 'prefer-exponentiation-operator': 'warn',
159
+ 'prefer-named-capture-group': 'off',
160
+ 'prefer-numeric-literals': 'warn',
161
+ 'prefer-object-has-own': 'off',
162
+ 'prefer-object-spread': 'warn',
163
+ 'prefer-promise-reject-errors': 'error',
164
+ 'prefer-regex-literals': 'off',
165
+ 'prefer-rest-params': 'error',
166
+ 'prefer-spread': 'error',
167
+ 'prefer-template': 'warn',
168
+ 'quote-props': 'off',
169
+ 'radix': 'error',
170
+ 'require-await': 'error',
171
+ 'require-unicode-regexp': 'error',
172
+ 'require-yield': 'error',
173
+ 'sort-imports': 'off',
174
+ 'sort-keys': 'off',
175
+ 'sort-vars': 'off',
176
+ 'spaced-comment': 'off',
177
+ 'strict': 'warn',
178
+ 'symbol-description': 'error',
179
+ 'vars-on-top': 'error',
180
+ 'yoda': ['warn', 'never']
181
+ };
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bestPracticesRules = void 0;
4
- exports.bestPracticesRules = {
5
- 'eslint-comments/disable-enable-pair': 'error',
6
- 'eslint-comments/no-aggregating-enable': 'error',
7
- 'eslint-comments/no-duplicate-disable': 'error',
8
- 'eslint-comments/no-unlimited-disable': 'error',
9
- 'eslint-comments/no-unused-disable': 'error',
10
- 'eslint-comments/no-unused-enable': 'error',
11
- };
1
+ export const bestPracticesRules = {
2
+ 'eslint-comments/disable-enable-pair': 'error',
3
+ 'eslint-comments/no-aggregating-enable': 'error',
4
+ 'eslint-comments/no-duplicate-disable': 'error',
5
+ 'eslint-comments/no-unlimited-disable': 'error',
6
+ 'eslint-comments/no-unused-disable': 'error',
7
+ 'eslint-comments/no-unused-enable': 'error'
8
+ };
@@ -1,7 +1,6 @@
1
- import * as eslintPluginEslintComments from 'eslint-plugin-eslint-comments';
2
1
  export declare const eslintCommentsConfig: {
3
2
  plugins: {
4
- 'eslint-comments': typeof eslintPluginEslintComments;
3
+ 'eslint-comments': import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
5
4
  };
6
5
  rules: {
7
6
  'eslint-comments/no-restricted-disable': string;
@@ -1,45 +1,9 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.eslintCommentsConfig = void 0;
37
- const eslintPluginEslintComments = __importStar(require("eslint-plugin-eslint-comments"));
38
- const best_practices_1 = require("./best-practices");
39
- const stylistic_issues_1 = require("./stylistic-issues");
40
- exports.eslintCommentsConfig = {
41
- plugins: {
42
- 'eslint-comments': eslintPluginEslintComments,
43
- },
44
- rules: Object.assign(Object.assign({}, best_practices_1.bestPracticesRules), stylistic_issues_1.stylisticIssuesRules),
45
- };
1
+ import eslintPluginEslintComments from 'eslint-plugin-eslint-comments';
2
+ import { bestPracticesRules } from "./best-practices.js";
3
+ import { stylisticIssuesRules } from "./stylistic-issues.js";
4
+ export const eslintCommentsConfig = {
5
+ plugins: {
6
+ 'eslint-comments': eslintPluginEslintComments
7
+ },
8
+ rules: Object.assign(Object.assign({}, bestPracticesRules), stylisticIssuesRules)
9
+ };
@@ -1,18 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stylisticIssuesRules = void 0;
4
- exports.stylisticIssuesRules = {
5
- 'eslint-comments/no-restricted-disable': 'off',
6
- 'eslint-comments/no-use': ['error', {
7
- allow: [
8
- 'eslint-disable',
9
- 'eslint-disable-next-line',
10
- 'eslint-enable',
11
- ],
12
- }],
13
- 'eslint-comments/require-description': ['error', {
14
- ignore: [
15
- 'eslint-enable',
16
- ],
17
- }],
18
- };
1
+ export const stylisticIssuesRules = {
2
+ 'eslint-comments/no-restricted-disable': 'off',
3
+ 'eslint-comments/no-use': ['error', {
4
+ allow: ['eslint-disable', 'eslint-disable-next-line', 'eslint-enable']
5
+ }],
6
+ 'eslint-comments/require-description': ['error', {
7
+ ignore: ['eslint-enable']
8
+ }]
9
+ };
@@ -1,14 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.helpfulWarningsRules = void 0;
4
- const no_extraneous_dependencies_1 = require("./rules/no-extraneous-dependencies");
5
- exports.helpfulWarningsRules = {
6
- 'import/export': 'error',
7
- 'import/no-deprecated': 'off',
8
- 'import/no-empty-named-blocks': 'warn',
9
- 'import/no-extraneous-dependencies': ['error', (0, no_extraneous_dependencies_1.importNoExtraneousDependencies)()],
10
- 'import/no-mutable-exports': 'error',
11
- 'import/no-named-as-default': 'error',
12
- 'import/no-named-as-default-member': 'error',
13
- 'import/no-unused-modules': 'error',
14
- };
1
+ import { importNoExtraneousDependencies } from "./rules/no-extraneous-dependencies.js";
2
+ export const helpfulWarningsRules = {
3
+ 'import/export': 'error',
4
+ 'import/no-deprecated': 'off',
5
+ 'import/no-empty-named-blocks': 'warn',
6
+ 'import/no-extraneous-dependencies': ['error', importNoExtraneousDependencies()],
7
+ 'import/no-mutable-exports': 'error',
8
+ 'import/no-named-as-default': 'error',
9
+ 'import/no-named-as-default-member': 'error',
10
+ 'import/no-unused-modules': 'error'
11
+ };
@@ -1,14 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.importConfig = void 0;
4
- const eslint_plugin_import_1 = require("eslint-plugin-import");
5
- const helpful_warnings_1 = require("./helpful-warnings");
6
- const module_systems_1 = require("./module-systems");
7
- const static_analysis_1 = require("./static-analysis");
8
- const style_guide_1 = require("./style-guide");
9
- exports.importConfig = {
10
- plugins: {
11
- import: eslint_plugin_import_1.flatConfigs.recommended.plugins.import,
12
- },
13
- rules: Object.assign(Object.assign(Object.assign(Object.assign({}, static_analysis_1.staticAnalysisRules), helpful_warnings_1.helpfulWarningsRules), module_systems_1.moduleSystemsRules), style_guide_1.styleGuideRules),
14
- };
1
+ import { flatConfigs } from 'eslint-plugin-import';
2
+ import { helpfulWarningsRules } from "./helpful-warnings.js";
3
+ import { moduleSystemsRules } from "./module-systems.js";
4
+ import { staticAnalysisRules } from "./static-analysis.js";
5
+ import { styleGuideRules } from "./style-guide.js";
6
+ export const importConfig = {
7
+ plugins: {
8
+ import: flatConfigs.recommended.plugins.import
9
+ },
10
+ rules: Object.assign(Object.assign(Object.assign(Object.assign({}, staticAnalysisRules), helpfulWarningsRules), moduleSystemsRules), styleGuideRules)
11
+ };
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.moduleSystemsRules = void 0;
4
- exports.moduleSystemsRules = {
5
- 'import/no-amd': 'error',
6
- 'import/no-commonjs': ['error', {
7
- allowConditionalRequire: true,
8
- allowPrimitiveModules: true,
9
- }],
10
- 'import/no-import-module-exports': 'error',
11
- 'import/no-nodejs-modules': 'off',
12
- 'import/unambiguous': 'error',
13
- };
1
+ export const moduleSystemsRules = {
2
+ 'import/no-amd': 'error',
3
+ 'import/no-commonjs': ['error', {
4
+ allowConditionalRequire: true,
5
+ allowPrimitiveModules: true
6
+ }],
7
+ 'import/no-import-module-exports': 'error',
8
+ 'import/no-nodejs-modules': 'off',
9
+ 'import/unambiguous': 'error'
10
+ };
@@ -5,6 +5,9 @@ export interface ImportNoExtraneousDependencies {
5
5
  bundledDependencies: boolean | string[];
6
6
  packageDir?: string;
7
7
  }
8
+ /**
9
+ * Returns configuration for the `import/no-extraneous-dependencies` rule.
10
+ */
8
11
  export declare function importNoExtraneousDependencies(overrides?: Partial<ImportNoExtraneousDependencies>): ImportNoExtraneousDependencies;
9
12
  export declare function jsImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;
10
13
  export declare function jestImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;