@perfective/eslint-config 0.29.2 → 0.31.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 (200) hide show
  1. package/LICENSE +1 -1
  2. package/README.adoc +198 -67
  3. package/README.md +62 -45
  4. package/config/array-func/array-func-config.d.ts +2 -0
  5. package/config/array-func/array-func-config.js +16 -0
  6. package/config/cypress/cypress-config.d.ts +10 -0
  7. package/config/cypress/cypress-config.js +38 -0
  8. package/config/cypress/index.d.ts +1 -0
  9. package/config/cypress/index.js +1 -0
  10. package/config/eslint/eslint-config.d.ts +2 -0
  11. package/config/eslint/eslint-config.js +8 -0
  12. package/config/eslint/layout-formatting-rules.d.ts +2 -0
  13. package/config/eslint/layout-formatting-rules.js +64 -0
  14. package/config/eslint/possible-problems-rules.d.ts +2 -0
  15. package/config/eslint/possible-problems-rules.js +96 -0
  16. package/config/eslint/suggestions-rules.d.ts +2 -0
  17. package/config/eslint/suggestions-rules.js +181 -0
  18. package/config/eslint-comments/best-practices-rules.d.ts +2 -0
  19. package/config/eslint-comments/best-practices-rules.js +8 -0
  20. package/config/eslint-comments/eslint-comments-config.d.ts +2 -0
  21. package/config/eslint-comments/eslint-comments-config.js +11 -0
  22. package/config/eslint-comments/stylistic-issues-rules.d.ts +2 -0
  23. package/config/eslint-comments/stylistic-issues-rules.js +9 -0
  24. package/config/import/helpful-warnings-rules.d.ts +2 -0
  25. package/config/import/helpful-warnings-rules.js +11 -0
  26. package/config/import/import-config.d.ts +4 -0
  27. package/config/import/import-config.js +46 -0
  28. package/config/import/index.d.ts +1 -0
  29. package/config/import/index.js +1 -0
  30. package/config/import/module-systems-rules.d.ts +2 -0
  31. package/config/import/module-systems-rules.js +10 -0
  32. package/config/import/rules/no-extraneous-dependencies.d.ts +15 -0
  33. package/config/import/rules/no-extraneous-dependencies.js +8 -0
  34. package/config/import/static-analysis-rules.d.ts +2 -0
  35. package/config/import/static-analysis-rules.js +26 -0
  36. package/config/import/style-guide-rules.d.ts +2 -0
  37. package/config/import/style-guide-rules.js +33 -0
  38. package/config/jest/index.d.ts +1 -0
  39. package/config/jest/index.js +1 -0
  40. package/config/jest/jest-config.d.ts +8 -0
  41. package/config/jest/jest-config.js +128 -0
  42. package/config/jest/typescript-eslint-jest-rules.d.ts +2 -0
  43. package/config/jest/typescript-eslint-jest-rules.js +5 -0
  44. package/config/jest-dom/index.d.ts +1 -0
  45. package/config/jest-dom/index.js +1 -0
  46. package/config/jest-dom/jest-dom-config.d.ts +8 -0
  47. package/config/jest-dom/jest-dom-config.js +23 -0
  48. package/config/jsdoc/jsdoc-config.d.ts +3 -0
  49. package/config/jsdoc/jsdoc-config.js +179 -0
  50. package/config/node/node-config.d.ts +2 -0
  51. package/config/node/node-config.js +66 -0
  52. package/config/perfective-eslint-config.d.ts +6 -0
  53. package/config/perfective-eslint-config.js +45 -0
  54. package/config/prefer-arrow/prefer-arrow-config.d.ts +2 -0
  55. package/config/prefer-arrow/prefer-arrow-config.js +16 -0
  56. package/config/promise/promise-config.d.ts +2 -0
  57. package/config/promise/promise-config.js +37 -0
  58. package/config/rxjs/index.d.ts +1 -0
  59. package/config/rxjs/index.js +1 -0
  60. package/config/rxjs/rxjs-config.d.ts +8 -0
  61. package/config/rxjs/rxjs-config.js +67 -0
  62. package/config/security/security-config.d.ts +2 -0
  63. package/config/security/security-config.js +24 -0
  64. package/config/simple-import-sort/index.d.ts +1 -0
  65. package/config/simple-import-sort/index.js +1 -0
  66. package/config/simple-import-sort/rules/imports.d.ts +28 -0
  67. package/config/simple-import-sort/rules/imports.js +32 -0
  68. package/config/simple-import-sort/simple-import-sort-config.d.ts +2 -0
  69. package/config/simple-import-sort/simple-import-sort-config.js +13 -0
  70. package/config/stylistic/js/stylistic-js-config.d.ts +2 -0
  71. package/config/stylistic/js/stylistic-js-config.js +200 -0
  72. package/config/stylistic/jsx/stylistic-jsx-config.d.ts +2 -0
  73. package/config/stylistic/jsx/stylistic-jsx-config.js +87 -0
  74. package/config/stylistic/plus/stylistic-plus-config.d.ts +2 -0
  75. package/config/stylistic/plus/stylistic-plus-config.js +16 -0
  76. package/config/stylistic/ts/stylistic-ts-config.d.ts +2 -0
  77. package/config/stylistic/ts/stylistic-ts-config.js +141 -0
  78. package/config/testing-library/index.d.ts +1 -0
  79. package/config/testing-library/index.js +1 -0
  80. package/config/testing-library/testing-library-config.d.ts +8 -0
  81. package/config/testing-library/testing-library-config.js +45 -0
  82. package/config/typescript-eslint/extension-rules.d.ts +2 -0
  83. package/config/typescript-eslint/extension-rules.js +113 -0
  84. package/config/typescript-eslint/index.d.ts +1 -0
  85. package/config/typescript-eslint/index.js +1 -0
  86. package/{rules → config}/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +39 -0
  87. package/config/typescript-eslint/rules/typescript-eslint-naming-convention.js +26 -0
  88. package/config/typescript-eslint/supported-rules.d.ts +2 -0
  89. package/config/typescript-eslint/supported-rules.js +260 -0
  90. package/config/typescript-eslint/typescript-eslint-config.d.ts +2 -0
  91. package/config/typescript-eslint/typescript-eslint-config.js +15 -0
  92. package/config/unicorn/index.d.ts +1 -0
  93. package/config/unicorn/index.js +1 -0
  94. package/{rules → config}/unicorn/rules/prevent-abbreviations.d.ts +20 -0
  95. package/config/unicorn/rules/prevent-abbreviations.js +30 -0
  96. package/config/unicorn/unicorn-config.d.ts +2 -0
  97. package/config/unicorn/unicorn-config.js +185 -0
  98. package/index.d.ts +5 -1732
  99. package/index.js +5 -146
  100. package/linter/glob.d.ts +59 -0
  101. package/linter/glob.js +8 -0
  102. package/linter/language-options.d.ts +25 -0
  103. package/linter/language-options.js +45 -0
  104. package/linter/linter-config.d.ts +13 -0
  105. package/linter/linter-config.js +6 -0
  106. package/linter/node.d.ts +10 -0
  107. package/linter/node.js +7 -0
  108. package/linter/plugin.d.ts +15 -0
  109. package/linter/plugin.js +26 -0
  110. package/package.json +45 -45
  111. package/config/node.d.ts +0 -1
  112. package/config/node.js +0 -11
  113. package/config/plugin.d.ts +0 -2
  114. package/config/plugin.js +0 -30
  115. package/config.d.ts +0 -1
  116. package/config.js +0 -6
  117. package/cypress.d.ts +0 -1
  118. package/cypress.js +0 -56
  119. package/jest-dom.d.ts +0 -1
  120. package/jest-dom.js +0 -11
  121. package/jest.d.ts +0 -1
  122. package/jest.js +0 -24
  123. package/rules/array-func/index.d.ts +0 -14
  124. package/rules/array-func/index.js +0 -50
  125. package/rules/cypress/index.d.ts +0 -21
  126. package/rules/cypress/index.js +0 -57
  127. package/rules/eslint/index.d.ts +0 -339
  128. package/rules/eslint/index.js +0 -9
  129. package/rules/eslint/layout-formatting.d.ts +0 -64
  130. package/rules/eslint/layout-formatting.js +0 -67
  131. package/rules/eslint/possible-problems.d.ts +0 -96
  132. package/rules/eslint/possible-problems.js +0 -99
  133. package/rules/eslint/suggestions.d.ts +0 -181
  134. package/rules/eslint/suggestions.js +0 -182
  135. package/rules/eslint-comments/best-practices.d.ts +0 -8
  136. package/rules/eslint-comments/best-practices.js +0 -11
  137. package/rules/eslint-comments/index.d.ts +0 -21
  138. package/rules/eslint-comments/index.js +0 -45
  139. package/rules/eslint-comments/stylistic-issues.d.ts +0 -9
  140. package/rules/eslint-comments/stylistic-issues.js +0 -18
  141. package/rules/import/helpful-warnings.d.ts +0 -10
  142. package/rules/import/helpful-warnings.js +0 -14
  143. package/rules/import/index.d.ts +0 -78
  144. package/rules/import/index.js +0 -14
  145. package/rules/import/module-systems.d.ts +0 -10
  146. package/rules/import/module-systems.js +0 -13
  147. package/rules/import/rules/no-extraneous-dependencies.d.ts +0 -11
  148. package/rules/import/rules/no-extraneous-dependencies.js +0 -24
  149. package/rules/import/static-analysis.d.ts +0 -26
  150. package/rules/import/static-analysis.js +0 -29
  151. package/rules/import/style-guide.d.ts +0 -33
  152. package/rules/import/style-guide.js +0 -36
  153. package/rules/jest/index.d.ts +0 -124
  154. package/rules/jest/index.js +0 -72
  155. package/rules/jest/typescript-eslint.d.ts +0 -5
  156. package/rules/jest/typescript-eslint.js +0 -8
  157. package/rules/jest-dom/index.d.ts +0 -32
  158. package/rules/jest-dom/index.js +0 -55
  159. package/rules/jsdoc/index.d.ts +0 -134
  160. package/rules/jsdoc/index.js +0 -347
  161. package/rules/n/index.d.ts +0 -66
  162. package/rules/n/index.js +0 -98
  163. package/rules/prefer-arrow/index.d.ts +0 -14
  164. package/rules/prefer-arrow/index.js +0 -50
  165. package/rules/promise/index.d.ts +0 -35
  166. package/rules/promise/index.js +0 -73
  167. package/rules/rxjs/index.d.ts +0 -60
  168. package/rules/rxjs/index.js +0 -96
  169. package/rules/security/index.d.ts +0 -22
  170. package/rules/security/index.js +0 -58
  171. package/rules/simple-import-sort/index.d.ts +0 -10
  172. package/rules/simple-import-sort/index.js +0 -48
  173. package/rules/simple-import-sort/rules/imports.d.ts +0 -8
  174. package/rules/simple-import-sort/rules/imports.js +0 -46
  175. package/rules/stylistic/js/index.d.ts +0 -197
  176. package/rules/stylistic/js/index.js +0 -236
  177. package/rules/stylistic/jsx/index.d.ts +0 -81
  178. package/rules/stylistic/jsx/index.js +0 -117
  179. package/rules/stylistic/plus/index.d.ts +0 -14
  180. package/rules/stylistic/plus/index.js +0 -50
  181. package/rules/stylistic/ts/index.d.ts +0 -135
  182. package/rules/stylistic/ts/index.js +0 -169
  183. package/rules/testing-library/index.d.ts +0 -62
  184. package/rules/testing-library/index.js +0 -77
  185. package/rules/typescript-eslint/extension-rules.d.ts +0 -113
  186. package/rules/typescript-eslint/extension-rules.js +0 -116
  187. package/rules/typescript-eslint/index.d.ts +0 -369
  188. package/rules/typescript-eslint/index.js +0 -45
  189. package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +0 -32
  190. package/rules/typescript-eslint/supported-rules.d.ts +0 -253
  191. package/rules/typescript-eslint/supported-rules.js +0 -319
  192. package/rules/unicorn/index.d.ts +0 -178
  193. package/rules/unicorn/index.js +0 -209
  194. package/rules/unicorn/rules/prevent-abbreviations.js +0 -8
  195. package/rules.d.ts +0 -4
  196. package/rules.js +0 -14
  197. package/rxjs.d.ts +0 -1
  198. package/rxjs.js +0 -58
  199. package/testing-library.d.ts +0 -1
  200. package/testing-library.js +0 -11
@@ -1,10 +0,0 @@
1
- export declare const helpfulWarningsRules: {
2
- 'import/export': string;
3
- 'import/no-deprecated': string;
4
- 'import/no-empty-named-blocks': string;
5
- 'import/no-extraneous-dependencies': (string | import("./rules/no-extraneous-dependencies").ImportNoExtraneousDependencies)[];
6
- 'import/no-mutable-exports': string;
7
- 'import/no-named-as-default': string;
8
- 'import/no-named-as-default-member': string;
9
- 'import/no-unused-modules': string;
10
- };
@@ -1,14 +0,0 @@
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,78 +0,0 @@
1
- export declare const importConfig: {
2
- plugins: {
3
- import: Record<string, unknown>;
4
- };
5
- rules: {
6
- 'import/consistent-type-specifier-style': string[];
7
- 'import/dynamic-import-chunkname': string;
8
- 'import/exports-last': string;
9
- 'import/extensions': (string | {
10
- checkTypeImports: boolean;
11
- })[];
12
- 'import/first': string;
13
- 'import/group-exports': string;
14
- 'import/max-dependencies': string;
15
- 'import/newline-after-import': (string | {
16
- considerComments: boolean;
17
- })[];
18
- 'import/no-anonymous-default-export': string;
19
- 'import/no-default-export': string;
20
- 'import/no-duplicates': (string | {
21
- considerQueryString: boolean;
22
- 'prefer-inline': boolean;
23
- })[];
24
- 'import/no-named-default': string;
25
- 'import/no-named-export': string;
26
- 'import/no-namespace': string;
27
- 'import/no-unassigned-import': string;
28
- 'import/order': (string | {
29
- groups: string[];
30
- 'newlines-between': string;
31
- alphabetize: {
32
- order: string;
33
- caseInsensitive: boolean;
34
- };
35
- })[];
36
- 'import/prefer-default-export': string;
37
- 'import/no-amd': string;
38
- 'import/no-commonjs': (string | {
39
- allowConditionalRequire: boolean;
40
- allowPrimitiveModules: boolean;
41
- })[];
42
- 'import/no-import-module-exports': string;
43
- 'import/no-nodejs-modules': string;
44
- 'import/unambiguous': string;
45
- 'import/export': string;
46
- 'import/no-deprecated': string;
47
- 'import/no-empty-named-blocks': string;
48
- 'import/no-extraneous-dependencies': (string | import("./rules/no-extraneous-dependencies").ImportNoExtraneousDependencies)[];
49
- 'import/no-mutable-exports': string;
50
- 'import/no-named-as-default': string;
51
- 'import/no-named-as-default-member': string;
52
- 'import/no-unused-modules': string;
53
- 'import/default': string;
54
- 'import/named': (string | {
55
- commonjs: boolean;
56
- })[];
57
- 'import/namespace': string;
58
- 'import/no-absolute-path': string;
59
- 'import/no-cycle': (string | {
60
- ignoreExternal: boolean;
61
- allowUnsafeDynamicCyclicDependency: boolean;
62
- })[];
63
- 'import/no-dynamic-require': (string | {
64
- esmodule: boolean;
65
- })[];
66
- 'import/no-internal-modules': string;
67
- 'import/no-relative-packages': string;
68
- 'import/no-relative-parent-imports': string;
69
- 'import/no-restricted-paths': string;
70
- 'import/no-self-import': string;
71
- 'import/no-unresolved': (string | {
72
- caseSensitive: boolean;
73
- caseSensitiveStrict: boolean;
74
- })[];
75
- 'import/no-useless-path-segments': string;
76
- 'import/no-webpack-loader-syntax': string;
77
- };
78
- };
@@ -1,14 +0,0 @@
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,10 +0,0 @@
1
- export declare const moduleSystemsRules: {
2
- 'import/no-amd': string;
3
- 'import/no-commonjs': (string | {
4
- allowConditionalRequire: boolean;
5
- allowPrimitiveModules: boolean;
6
- })[];
7
- 'import/no-import-module-exports': string;
8
- 'import/no-nodejs-modules': string;
9
- 'import/unambiguous': string;
10
- };
@@ -1,13 +0,0 @@
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,11 +0,0 @@
1
- export interface ImportNoExtraneousDependencies {
2
- devDependencies: boolean | string[];
3
- optionalDependencies: boolean | string[];
4
- peerDependencies: boolean | string[];
5
- bundledDependencies: boolean | string[];
6
- packageDir?: string;
7
- }
8
- export declare function importNoExtraneousDependencies(overrides?: Partial<ImportNoExtraneousDependencies>): ImportNoExtraneousDependencies;
9
- export declare function jsImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;
10
- export declare function jestImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;
11
- export declare function cypressImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.importNoExtraneousDependencies = importNoExtraneousDependencies;
4
- exports.jsImportNoExtraneousDependencies = jsImportNoExtraneousDependencies;
5
- exports.jestImportNoExtraneousDependencies = jestImportNoExtraneousDependencies;
6
- exports.cypressImportNoExtraneousDependencies = cypressImportNoExtraneousDependencies;
7
- function importNoExtraneousDependencies(overrides = {}) {
8
- return Object.assign({ bundledDependencies: true, devDependencies: false, optionalDependencies: false, peerDependencies: false }, overrides);
9
- }
10
- function jsImportNoExtraneousDependencies(devDependencies = ['**/.*.js', '**/*.config.js', '**/gulpfile.js']) {
11
- return importNoExtraneousDependencies({
12
- devDependencies,
13
- });
14
- }
15
- function jestImportNoExtraneousDependencies(devDependencies = ['**/*.@(spec|test).[jt]s?(x)']) {
16
- return importNoExtraneousDependencies({
17
- devDependencies,
18
- });
19
- }
20
- function cypressImportNoExtraneousDependencies(devDependencies = ['cypress/**/*.[jt]s']) {
21
- return importNoExtraneousDependencies({
22
- devDependencies,
23
- });
24
- }
@@ -1,26 +0,0 @@
1
- export declare const staticAnalysisRules: {
2
- 'import/default': string;
3
- 'import/named': (string | {
4
- commonjs: boolean;
5
- })[];
6
- 'import/namespace': string;
7
- 'import/no-absolute-path': string;
8
- 'import/no-cycle': (string | {
9
- ignoreExternal: boolean;
10
- allowUnsafeDynamicCyclicDependency: boolean;
11
- })[];
12
- 'import/no-dynamic-require': (string | {
13
- esmodule: boolean;
14
- })[];
15
- 'import/no-internal-modules': string;
16
- 'import/no-relative-packages': string;
17
- 'import/no-relative-parent-imports': string;
18
- 'import/no-restricted-paths': string;
19
- 'import/no-self-import': string;
20
- 'import/no-unresolved': (string | {
21
- caseSensitive: boolean;
22
- caseSensitiveStrict: boolean;
23
- })[];
24
- 'import/no-useless-path-segments': string;
25
- 'import/no-webpack-loader-syntax': string;
26
- };
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.staticAnalysisRules = void 0;
4
- exports.staticAnalysisRules = {
5
- 'import/default': 'error',
6
- 'import/named': ['error', {
7
- commonjs: false,
8
- }],
9
- 'import/namespace': 'error',
10
- 'import/no-absolute-path': 'error',
11
- 'import/no-cycle': ['error', {
12
- ignoreExternal: true,
13
- allowUnsafeDynamicCyclicDependency: false,
14
- }],
15
- 'import/no-dynamic-require': ['error', {
16
- esmodule: true,
17
- }],
18
- 'import/no-internal-modules': 'off',
19
- 'import/no-relative-packages': 'warn',
20
- 'import/no-relative-parent-imports': 'off',
21
- 'import/no-restricted-paths': 'off',
22
- 'import/no-self-import': 'error',
23
- 'import/no-unresolved': ['error', {
24
- caseSensitive: true,
25
- caseSensitiveStrict: true,
26
- }],
27
- 'import/no-useless-path-segments': 'warn',
28
- 'import/no-webpack-loader-syntax': 'error',
29
- };
@@ -1,33 +0,0 @@
1
- export declare const styleGuideRules: {
2
- 'import/consistent-type-specifier-style': string[];
3
- 'import/dynamic-import-chunkname': string;
4
- 'import/exports-last': string;
5
- 'import/extensions': (string | {
6
- checkTypeImports: boolean;
7
- })[];
8
- 'import/first': string;
9
- 'import/group-exports': string;
10
- 'import/max-dependencies': string;
11
- 'import/newline-after-import': (string | {
12
- considerComments: boolean;
13
- })[];
14
- 'import/no-anonymous-default-export': string;
15
- 'import/no-default-export': string;
16
- 'import/no-duplicates': (string | {
17
- considerQueryString: boolean;
18
- 'prefer-inline': boolean;
19
- })[];
20
- 'import/no-named-default': string;
21
- 'import/no-named-export': string;
22
- 'import/no-namespace': string;
23
- 'import/no-unassigned-import': string;
24
- 'import/order': (string | {
25
- groups: string[];
26
- 'newlines-between': string;
27
- alphabetize: {
28
- order: string;
29
- caseInsensitive: boolean;
30
- };
31
- })[];
32
- 'import/prefer-default-export': string;
33
- };
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.styleGuideRules = void 0;
4
- exports.styleGuideRules = {
5
- 'import/consistent-type-specifier-style': ['warn', 'prefer-inline'],
6
- 'import/dynamic-import-chunkname': 'off',
7
- 'import/exports-last': 'off',
8
- 'import/extensions': ['error', 'never', {
9
- checkTypeImports: true,
10
- }],
11
- 'import/first': 'off',
12
- 'import/group-exports': 'off',
13
- 'import/max-dependencies': 'off',
14
- 'import/newline-after-import': ['warn', {
15
- considerComments: true,
16
- }],
17
- 'import/no-anonymous-default-export': 'error',
18
- 'import/no-default-export': 'error',
19
- 'import/no-duplicates': ['warn', {
20
- 'considerQueryString': true,
21
- 'prefer-inline': true,
22
- }],
23
- 'import/no-named-default': 'error',
24
- 'import/no-named-export': 'off',
25
- 'import/no-namespace': 'off',
26
- 'import/no-unassigned-import': 'error',
27
- 'import/order': ['off', {
28
- 'groups': ['unknown', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
29
- 'newlines-between': 'always',
30
- 'alphabetize': {
31
- order: 'asc',
32
- caseInsensitive: false,
33
- },
34
- }],
35
- 'import/prefer-default-export': 'off',
36
- };
@@ -1,124 +0,0 @@
1
- export declare const jestConfig: {
2
- plugins: {
3
- jest: {
4
- meta: {
5
- name: string;
6
- version: string;
7
- };
8
- environments: {
9
- globals: {
10
- globals: {
11
- [key: string]: boolean;
12
- };
13
- };
14
- };
15
- configs: {
16
- all: import("eslint").Linter.LegacyConfig;
17
- recommended: import("eslint").Linter.LegacyConfig;
18
- style: import("eslint").Linter.LegacyConfig;
19
- "flat/all": import("eslint").Linter.FlatConfig;
20
- "flat/recommended": import("eslint").Linter.FlatConfig;
21
- "flat/style": import("eslint").Linter.FlatConfig;
22
- };
23
- rules: {
24
- [key: string]: import("eslint").Rule.RuleModule;
25
- };
26
- };
27
- };
28
- languageOptions: {
29
- globals: {
30
- [key: string]: boolean;
31
- };
32
- };
33
- rules: {
34
- 'jest/consistent-test-it': (string | {
35
- fn: string;
36
- withinDescribe: string;
37
- })[];
38
- 'jest/expect-expect': (string | {
39
- assertFunctionNames: string[];
40
- additionalTestBlockFunctions: never[];
41
- })[];
42
- 'jest/max-expects': (string | {
43
- max: number;
44
- })[];
45
- 'jest/max-nested-describe': (string | {
46
- max: number;
47
- })[];
48
- 'jest/no-alias-methods': string;
49
- 'jest/no-commented-out-tests': string;
50
- 'jest/no-conditional-expect': string;
51
- 'jest/no-conditional-in-test': string;
52
- 'jest/no-confusing-set-timeout': string;
53
- 'jest/no-deprecated-functions': string;
54
- 'jest/no-disabled-tests': string;
55
- 'jest/no-done-callback': string;
56
- 'jest/no-duplicate-hooks': string;
57
- 'jest/no-export': string;
58
- 'jest/no-focused-tests': string;
59
- 'jest/no-hooks': string;
60
- 'jest/no-identical-title': string;
61
- 'jest/no-interpolation-in-snapshots': string;
62
- 'jest/no-jasmine-globals': string;
63
- 'jest/no-large-snapshots': string;
64
- 'jest/no-mocks-import': string;
65
- 'jest/no-restricted-jest-methods': string;
66
- 'jest/no-restricted-matchers': (string | {
67
- toBeFalsy: string;
68
- toBeTruthy: string;
69
- toMatchSnapshot: string;
70
- toThrowErrorMatchingSnapshot: string;
71
- })[];
72
- 'jest/no-standalone-expect': string;
73
- 'jest/no-test-prefixes': string;
74
- 'jest/no-test-return-statement': string;
75
- 'jest/no-untyped-mock-factory': string;
76
- 'jest/padding-around-after-all-blocks': string;
77
- 'jest/padding-around-after-each-blocks': string;
78
- 'jest/padding-around-all': string;
79
- 'jest/padding-around-before-all-blocks': string;
80
- 'jest/padding-around-before-each-blocks': string;
81
- 'jest/padding-around-describe-blocks': string;
82
- 'jest/padding-around-expect-groups': string;
83
- 'jest/padding-around-test-blocks': string;
84
- 'jest/prefer-called-with': string;
85
- 'jest/prefer-comparison-matcher': string;
86
- 'jest/prefer-each': string;
87
- 'jest/prefer-equality-matcher': string;
88
- 'jest/prefer-expect-assertions': string;
89
- 'jest/prefer-expect-resolves': string;
90
- 'jest/prefer-hooks-in-order': string;
91
- 'jest/prefer-hooks-on-top': string;
92
- 'jest/prefer-importing-jest-globals': string;
93
- 'jest/prefer-jest-mocked': string;
94
- 'jest/prefer-lowercase-title': (string | {
95
- allowedPrefixes: never[];
96
- ignore: never[];
97
- ignoreTopLevelDescribe: boolean;
98
- })[];
99
- 'jest/prefer-mock-promise-shorthand': string;
100
- 'jest/prefer-snapshot-hint': string[];
101
- 'jest/prefer-spy-on': string;
102
- 'jest/prefer-strict-equal': string;
103
- 'jest/prefer-to-be': string;
104
- 'jest/prefer-to-contain': string;
105
- 'jest/prefer-to-have-length': string;
106
- 'jest/prefer-todo': string;
107
- 'jest/require-hook': (string | {
108
- allowedFunctionCalls: never[];
109
- })[];
110
- 'jest/require-to-throw-message': string;
111
- 'jest/require-top-level-describe': string;
112
- 'jest/valid-describe-callback': string;
113
- 'jest/valid-expect-in-promise': string;
114
- 'jest/valid-expect': string;
115
- 'jest/valid-title': (string | {
116
- ignoreTypeOfDescribeName: boolean;
117
- ignoreTypeOfTestName: boolean;
118
- ignoreSpaces: boolean;
119
- })[];
120
- 'jest/unbound-method': (string | {
121
- ignoreStatic: boolean;
122
- })[];
123
- };
124
- };
@@ -1,72 +0,0 @@
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.jestConfig = void 0;
37
- const eslintPluginJest = __importStar(require("eslint-plugin-jest"));
38
- const typescript_eslint_1 = require("./typescript-eslint");
39
- exports.jestConfig = {
40
- plugins: {
41
- jest: eslintPluginJest,
42
- },
43
- languageOptions: {
44
- globals: eslintPluginJest.environments.globals.globals,
45
- },
46
- rules: Object.assign(Object.assign({}, typescript_eslint_1.typescriptEslintJestRules), { 'jest/consistent-test-it': ['warn', {
47
- fn: 'test',
48
- withinDescribe: 'it',
49
- }], 'jest/expect-expect': ['error', {
50
- assertFunctionNames: ['expect', 'request.*.expect'],
51
- additionalTestBlockFunctions: [],
52
- }], 'jest/max-expects': ['error', {
53
- max: 5,
54
- }], 'jest/max-nested-describe': ['error', {
55
- max: 4,
56
- }], 'jest/no-alias-methods': 'warn', 'jest/no-commented-out-tests': 'error', 'jest/no-conditional-expect': 'error', 'jest/no-conditional-in-test': 'error', 'jest/no-confusing-set-timeout': 'error', 'jest/no-deprecated-functions': 'warn', 'jest/no-disabled-tests': 'error', 'jest/no-done-callback': 'error', 'jest/no-duplicate-hooks': 'error', 'jest/no-export': 'error', 'jest/no-focused-tests': 'warn', 'jest/no-hooks': 'off', 'jest/no-identical-title': 'error', 'jest/no-interpolation-in-snapshots': 'error', 'jest/no-jasmine-globals': 'warn', 'jest/no-large-snapshots': 'error', 'jest/no-mocks-import': 'error', 'jest/no-restricted-jest-methods': 'off', 'jest/no-restricted-matchers': ['error', {
57
- toBeFalsy: 'Avoid `toBeFalsy`',
58
- toBeTruthy: 'Avoid `toBeTruthy`',
59
- toMatchSnapshot: 'Use `toMatchInlineSnapshot()` instead',
60
- toThrowErrorMatchingSnapshot: 'Use `toThrowErrorMatchingInlineSnapshot()` instead',
61
- }], 'jest/no-standalone-expect': 'error', 'jest/no-test-prefixes': 'warn', 'jest/no-test-return-statement': 'error', 'jest/no-untyped-mock-factory': 'warn', 'jest/padding-around-after-all-blocks': 'warn', 'jest/padding-around-after-each-blocks': 'warn', 'jest/padding-around-all': 'warn', 'jest/padding-around-before-all-blocks': 'warn', 'jest/padding-around-before-each-blocks': 'warn', 'jest/padding-around-describe-blocks': 'warn', 'jest/padding-around-expect-groups': 'warn', 'jest/padding-around-test-blocks': 'warn', 'jest/prefer-called-with': 'error', 'jest/prefer-comparison-matcher': 'warn', 'jest/prefer-each': 'error', 'jest/prefer-equality-matcher': 'error', 'jest/prefer-expect-assertions': 'off', 'jest/prefer-expect-resolves': 'warn', 'jest/prefer-hooks-in-order': 'error', 'jest/prefer-hooks-on-top': 'error', 'jest/prefer-importing-jest-globals': 'warn', 'jest/prefer-jest-mocked': 'warn', 'jest/prefer-lowercase-title': ['error', {
62
- allowedPrefixes: [],
63
- ignore: [],
64
- ignoreTopLevelDescribe: true,
65
- }], 'jest/prefer-mock-promise-shorthand': 'warn', 'jest/prefer-snapshot-hint': ['error', 'always'], 'jest/prefer-spy-on': 'warn', 'jest/prefer-strict-equal': 'warn', 'jest/prefer-to-be': 'warn', 'jest/prefer-to-contain': 'warn', 'jest/prefer-to-have-length': 'warn', 'jest/prefer-todo': 'warn', 'jest/require-hook': ['error', {
66
- allowedFunctionCalls: [],
67
- }], 'jest/require-to-throw-message': 'error', 'jest/require-top-level-describe': 'error', 'jest/valid-describe-callback': 'error', 'jest/valid-expect-in-promise': 'error', 'jest/valid-expect': 'error', 'jest/valid-title': ['warn', {
68
- ignoreTypeOfDescribeName: true,
69
- ignoreTypeOfTestName: false,
70
- ignoreSpaces: false,
71
- }] }),
72
- };
@@ -1,5 +0,0 @@
1
- export declare const typescriptEslintJestRules: {
2
- 'jest/unbound-method': (string | {
3
- ignoreStatic: boolean;
4
- })[];
5
- };
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.typescriptEslintJestRules = void 0;
4
- exports.typescriptEslintJestRules = {
5
- 'jest/unbound-method': ['error', {
6
- ignoreStatic: false,
7
- }],
8
- };
@@ -1,32 +0,0 @@
1
- export declare const jestDomConfig: {
2
- plugins: {
3
- 'jest-dom': {
4
- meta: {
5
- name: string;
6
- version: string;
7
- };
8
- configs: {
9
- all: import("eslint").Linter.LegacyConfig;
10
- recommended: import("eslint").Linter.LegacyConfig;
11
- "flat/all": import("eslint").Linter.FlatConfig;
12
- "flat/recommended": import("eslint").Linter.FlatConfig;
13
- };
14
- rules: {
15
- [key: string]: import("eslint").Rule.RuleModule;
16
- };
17
- };
18
- };
19
- rules: {
20
- 'jest-dom/prefer-checked': string;
21
- 'jest-dom/prefer-empty': string;
22
- 'jest-dom/prefer-enabled-disabled': string;
23
- 'jest-dom/prefer-focus': string;
24
- 'jest-dom/prefer-in-document': string;
25
- 'jest-dom/prefer-required': string;
26
- 'jest-dom/prefer-to-have-attribute': string;
27
- 'jest-dom/prefer-to-have-class': string;
28
- 'jest-dom/prefer-to-have-style': string;
29
- 'jest-dom/prefer-to-have-text-content': string;
30
- 'jest-dom/prefer-to-have-value': string;
31
- };
32
- };
@@ -1,55 +0,0 @@
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.jestDomConfig = void 0;
37
- const eslintPluginJestDom = __importStar(require("eslint-plugin-jest-dom"));
38
- exports.jestDomConfig = {
39
- plugins: {
40
- 'jest-dom': eslintPluginJestDom,
41
- },
42
- rules: {
43
- 'jest-dom/prefer-checked': 'warn',
44
- 'jest-dom/prefer-empty': 'warn',
45
- 'jest-dom/prefer-enabled-disabled': 'warn',
46
- 'jest-dom/prefer-focus': 'warn',
47
- 'jest-dom/prefer-in-document': 'off',
48
- 'jest-dom/prefer-required': 'warn',
49
- 'jest-dom/prefer-to-have-attribute': 'warn',
50
- 'jest-dom/prefer-to-have-class': 'warn',
51
- 'jest-dom/prefer-to-have-style': 'warn',
52
- 'jest-dom/prefer-to-have-text-content': 'warn',
53
- 'jest-dom/prefer-to-have-value': 'warn',
54
- },
55
- };