@perfective/eslint-config 0.30.0 → 0.31.1

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 (179) hide show
  1. package/README.adoc +185 -60
  2. package/README.md +53 -40
  3. package/config/array-func/array-func-config.d.ts +2 -0
  4. package/config/array-func/array-func-config.js +16 -0
  5. package/config/cypress/cypress-config.d.ts +10 -0
  6. package/config/cypress/cypress-config.js +38 -0
  7. package/config/cypress/index.d.ts +1 -0
  8. package/config/cypress/index.js +1 -0
  9. package/config/eslint/eslint-config.d.ts +2 -0
  10. package/config/eslint/eslint-config.js +8 -0
  11. package/config/eslint/layout-formatting-rules.d.ts +2 -0
  12. package/config/eslint/possible-problems-rules.d.ts +2 -0
  13. package/config/eslint/suggestions-rules.d.ts +2 -0
  14. package/config/eslint-comments/best-practices-rules.d.ts +2 -0
  15. package/config/eslint-comments/eslint-comments-config.d.ts +2 -0
  16. package/config/eslint-comments/eslint-comments-config.js +11 -0
  17. package/config/eslint-comments/stylistic-issues-rules.d.ts +2 -0
  18. package/config/import/helpful-warnings-rules.d.ts +2 -0
  19. package/config/import/import-config.d.ts +4 -0
  20. package/config/import/import-config.js +46 -0
  21. package/config/import/index.d.ts +1 -0
  22. package/config/import/index.js +1 -0
  23. package/config/import/module-systems-rules.d.ts +2 -0
  24. package/config/import/rules/no-extraneous-dependencies.d.ts +15 -0
  25. package/config/import/rules/no-extraneous-dependencies.js +8 -0
  26. package/config/import/static-analysis-rules.d.ts +2 -0
  27. package/config/import/style-guide-rules.d.ts +2 -0
  28. package/config/jest/index.d.ts +1 -0
  29. package/config/jest/index.js +1 -0
  30. package/config/jest/jest-config.d.ts +8 -0
  31. package/config/jest/jest-config.js +128 -0
  32. package/config/jest/typescript-eslint-jest-rules.d.ts +2 -0
  33. package/config/jest-dom/index.d.ts +1 -0
  34. package/config/jest-dom/index.js +1 -0
  35. package/config/jest-dom/jest-dom-config.d.ts +8 -0
  36. package/config/jest-dom/jest-dom-config.js +23 -0
  37. package/config/jsdoc/jsdoc-config.d.ts +3 -0
  38. package/config/jsdoc/jsdoc-config.js +179 -0
  39. package/config/node/node-config.d.ts +2 -0
  40. package/config/node/node-config.js +66 -0
  41. package/config/perfective-eslint-config.d.ts +6 -0
  42. package/config/perfective-eslint-config.js +45 -0
  43. package/config/prefer-arrow/prefer-arrow-config.d.ts +2 -0
  44. package/config/prefer-arrow/prefer-arrow-config.js +16 -0
  45. package/config/promise/promise-config.d.ts +2 -0
  46. package/config/promise/promise-config.js +37 -0
  47. package/config/rxjs/index.d.ts +1 -0
  48. package/config/rxjs/index.js +1 -0
  49. package/config/rxjs/rxjs-config.d.ts +8 -0
  50. package/config/rxjs/rxjs-config.js +67 -0
  51. package/config/security/security-config.d.ts +2 -0
  52. package/config/security/security-config.js +24 -0
  53. package/config/simple-import-sort/index.d.ts +1 -0
  54. package/config/simple-import-sort/index.js +1 -0
  55. package/{rules → config}/simple-import-sort/rules/imports.d.ts +11 -2
  56. package/config/simple-import-sort/simple-import-sort-config.d.ts +2 -0
  57. package/config/simple-import-sort/simple-import-sort-config.js +13 -0
  58. package/config/stylistic/js/stylistic-js-config.d.ts +2 -0
  59. package/config/stylistic/js/stylistic-js-config.js +200 -0
  60. package/config/stylistic/jsx/stylistic-jsx-config.d.ts +2 -0
  61. package/config/stylistic/jsx/stylistic-jsx-config.js +87 -0
  62. package/config/stylistic/plus/stylistic-plus-config.d.ts +2 -0
  63. package/config/stylistic/plus/stylistic-plus-config.js +16 -0
  64. package/config/stylistic/ts/stylistic-ts-config.d.ts +2 -0
  65. package/config/stylistic/ts/stylistic-ts-config.js +141 -0
  66. package/config/testing-library/index.d.ts +1 -0
  67. package/config/testing-library/index.js +1 -0
  68. package/config/testing-library/testing-library-config.d.ts +8 -0
  69. package/config/testing-library/testing-library-config.js +45 -0
  70. package/config/typescript-eslint/extension-rules.d.ts +2 -0
  71. package/config/typescript-eslint/index.d.ts +1 -0
  72. package/config/typescript-eslint/index.js +1 -0
  73. package/{rules → config}/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +35 -1
  74. package/config/typescript-eslint/supported-rules.d.ts +2 -0
  75. package/{rules → config}/typescript-eslint/supported-rules.js +7 -3
  76. package/config/typescript-eslint/typescript-eslint-config.d.ts +2 -0
  77. package/config/typescript-eslint/typescript-eslint-config.js +15 -0
  78. package/config/unicorn/index.d.ts +1 -0
  79. package/config/unicorn/index.js +1 -0
  80. package/{rules → config}/unicorn/rules/prevent-abbreviations.d.ts +14 -2
  81. package/config/unicorn/unicorn-config.d.ts +2 -0
  82. package/config/unicorn/unicorn-config.js +185 -0
  83. package/index.d.ts +5 -1766
  84. package/index.js +5 -102
  85. package/linter/glob.d.ts +59 -0
  86. package/linter/glob.js +8 -0
  87. package/linter/language-options.d.ts +25 -0
  88. package/linter/language-options.js +45 -0
  89. package/linter/linter-config.d.ts +13 -0
  90. package/linter/linter-config.js +6 -0
  91. package/{config → linter}/node.d.ts +3 -1
  92. package/{config → linter}/plugin.d.ts +6 -2
  93. package/package.json +38 -40
  94. package/config.d.ts +0 -1
  95. package/config.js +0 -1
  96. package/cypress.d.ts +0 -6
  97. package/cypress.js +0 -31
  98. package/jest-dom.d.ts +0 -1
  99. package/jest-dom.js +0 -8
  100. package/jest.d.ts +0 -7
  101. package/jest.js +0 -29
  102. package/rules/array-func/index.d.ts +0 -13
  103. package/rules/array-func/index.js +0 -14
  104. package/rules/cypress/index.d.ts +0 -29
  105. package/rules/cypress/index.js +0 -23
  106. package/rules/eslint/index.d.ts +0 -339
  107. package/rules/eslint/index.js +0 -6
  108. package/rules/eslint/layout-formatting.d.ts +0 -64
  109. package/rules/eslint/possible-problems.d.ts +0 -96
  110. package/rules/eslint/suggestions.d.ts +0 -181
  111. package/rules/eslint-comments/best-practices.d.ts +0 -8
  112. package/rules/eslint-comments/index.d.ts +0 -20
  113. package/rules/eslint-comments/index.js +0 -9
  114. package/rules/eslint-comments/stylistic-issues.d.ts +0 -9
  115. package/rules/import/helpful-warnings.d.ts +0 -10
  116. package/rules/import/index.d.ts +0 -78
  117. package/rules/import/index.js +0 -11
  118. package/rules/import/module-systems.d.ts +0 -10
  119. package/rules/import/rules/no-extraneous-dependencies.d.ts +0 -14
  120. package/rules/import/rules/no-extraneous-dependencies.js +0 -23
  121. package/rules/import/static-analysis.d.ts +0 -26
  122. package/rules/import/style-guide.d.ts +0 -33
  123. package/rules/jest/index.d.ts +0 -124
  124. package/rules/jest/index.js +0 -98
  125. package/rules/jest/typescript-eslint.d.ts +0 -5
  126. package/rules/jest-dom/index.d.ts +0 -32
  127. package/rules/jest-dom/index.js +0 -19
  128. package/rules/jsdoc/index.d.ts +0 -134
  129. package/rules/jsdoc/index.js +0 -161
  130. package/rules/n/index.d.ts +0 -66
  131. package/rules/n/index.js +0 -64
  132. package/rules/prefer-arrow/index.d.ts +0 -13
  133. package/rules/prefer-arrow/index.js +0 -14
  134. package/rules/promise/index.d.ts +0 -34
  135. package/rules/promise/index.js +0 -35
  136. package/rules/rxjs/index.d.ts +0 -60
  137. package/rules/rxjs/index.js +0 -60
  138. package/rules/security/index.d.ts +0 -21
  139. package/rules/security/index.js +0 -22
  140. package/rules/simple-import-sort/index.d.ts +0 -10
  141. package/rules/simple-import-sort/index.js +0 -12
  142. package/rules/stylistic/js/index.d.ts +0 -204
  143. package/rules/stylistic/js/index.js +0 -198
  144. package/rules/stylistic/jsx/index.d.ts +0 -87
  145. package/rules/stylistic/jsx/index.js +0 -81
  146. package/rules/stylistic/plus/index.d.ts +0 -18
  147. package/rules/stylistic/plus/index.js +0 -14
  148. package/rules/stylistic/ts/index.d.ts +0 -141
  149. package/rules/stylistic/ts/index.js +0 -135
  150. package/rules/testing-library/index.d.ts +0 -62
  151. package/rules/testing-library/index.js +0 -41
  152. package/rules/typescript-eslint/extension-rules.d.ts +0 -113
  153. package/rules/typescript-eslint/index.d.ts +0 -371
  154. package/rules/typescript-eslint/index.js +0 -9
  155. package/rules/typescript-eslint/supported-rules.d.ts +0 -255
  156. package/rules/unicorn/index.d.ts +0 -183
  157. package/rules/unicorn/index.js +0 -178
  158. package/rules.d.ts +0 -4
  159. package/rules.js +0 -4
  160. package/rxjs.d.ts +0 -6
  161. package/rxjs.js +0 -22
  162. package/testing-library.d.ts +0 -1
  163. package/testing-library.js +0 -8
  164. /package/{rules/eslint/layout-formatting.js → config/eslint/layout-formatting-rules.js} +0 -0
  165. /package/{rules/eslint/possible-problems.js → config/eslint/possible-problems-rules.js} +0 -0
  166. /package/{rules/eslint/suggestions.js → config/eslint/suggestions-rules.js} +0 -0
  167. /package/{rules/eslint-comments/best-practices.js → config/eslint-comments/best-practices-rules.js} +0 -0
  168. /package/{rules/eslint-comments/stylistic-issues.js → config/eslint-comments/stylistic-issues-rules.js} +0 -0
  169. /package/{rules/import/helpful-warnings.js → config/import/helpful-warnings-rules.js} +0 -0
  170. /package/{rules/import/module-systems.js → config/import/module-systems-rules.js} +0 -0
  171. /package/{rules/import/static-analysis.js → config/import/static-analysis-rules.js} +0 -0
  172. /package/{rules/import/style-guide.js → config/import/style-guide-rules.js} +0 -0
  173. /package/{rules/jest/typescript-eslint.js → config/jest/typescript-eslint-jest-rules.js} +0 -0
  174. /package/{rules → config}/simple-import-sort/rules/imports.js +0 -0
  175. /package/{rules → config}/typescript-eslint/extension-rules.js +0 -0
  176. /package/{rules → config}/typescript-eslint/rules/typescript-eslint-naming-convention.js +0 -0
  177. /package/{rules → config}/unicorn/rules/prevent-abbreviations.js +0 -0
  178. /package/{config → linter}/node.js +0 -0
  179. /package/{config → linter}/plugin.js +0 -0
@@ -1,8 +0,0 @@
1
- export declare const bestPracticesRules: {
2
- 'eslint-comments/disable-enable-pair': string;
3
- 'eslint-comments/no-aggregating-enable': string;
4
- 'eslint-comments/no-duplicate-disable': string;
5
- 'eslint-comments/no-unlimited-disable': string;
6
- 'eslint-comments/no-unused-disable': string;
7
- 'eslint-comments/no-unused-enable': string;
8
- };
@@ -1,20 +0,0 @@
1
- export declare const eslintCommentsConfig: {
2
- plugins: {
3
- 'eslint-comments': import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.Plugin;
4
- };
5
- rules: {
6
- 'eslint-comments/no-restricted-disable': string;
7
- 'eslint-comments/no-use': (string | {
8
- allow: string[];
9
- })[];
10
- 'eslint-comments/require-description': (string | {
11
- ignore: string[];
12
- })[];
13
- 'eslint-comments/disable-enable-pair': string;
14
- 'eslint-comments/no-aggregating-enable': string;
15
- 'eslint-comments/no-duplicate-disable': string;
16
- 'eslint-comments/no-unlimited-disable': string;
17
- 'eslint-comments/no-unused-disable': string;
18
- 'eslint-comments/no-unused-enable': string;
19
- };
20
- };
@@ -1,9 +0,0 @@
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,9 +0,0 @@
1
- export declare const stylisticIssuesRules: {
2
- 'eslint-comments/no-restricted-disable': string;
3
- 'eslint-comments/no-use': (string | {
4
- allow: string[];
5
- })[];
6
- 'eslint-comments/require-description': (string | {
7
- ignore: string[];
8
- })[];
9
- };
@@ -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,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,11 +0,0 @@
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,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,14 +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
- /**
9
- * Returns configuration for the `import/no-extraneous-dependencies` rule.
10
- */
11
- export declare function importNoExtraneousDependencies(overrides?: Partial<ImportNoExtraneousDependencies>): ImportNoExtraneousDependencies;
12
- export declare function jsImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;
13
- export declare function jestImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;
14
- export declare function cypressImportNoExtraneousDependencies(devDependencies?: boolean | string[]): ImportNoExtraneousDependencies;
@@ -1,23 +0,0 @@
1
- export function importNoExtraneousDependencies(overrides = {}) {
2
- return Object.assign({
3
- bundledDependencies: true,
4
- devDependencies: false,
5
- optionalDependencies: false,
6
- peerDependencies: false
7
- }, overrides);
8
- }
9
- export function jsImportNoExtraneousDependencies(devDependencies = ['**/.*.js', '**/*.config.js', '**/gulpfile.js']) {
10
- return importNoExtraneousDependencies({
11
- devDependencies
12
- });
13
- }
14
- export function jestImportNoExtraneousDependencies(devDependencies = ['**/*.@(spec|test).[jt]s?(x)']) {
15
- return importNoExtraneousDependencies({
16
- devDependencies
17
- });
18
- }
19
- export function cypressImportNoExtraneousDependencies(devDependencies = ['cypress/**/*.[jt]s']) {
20
- return importNoExtraneousDependencies({
21
- devDependencies
22
- });
23
- }
@@ -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,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,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,98 +0,0 @@
1
- import eslintPluginJest from 'eslint-plugin-jest';
2
- import { typescriptEslintJestRules } from "./typescript-eslint.js";
3
- export const jestConfig = {
4
- plugins: {
5
- jest: eslintPluginJest
6
- },
7
- languageOptions: {
8
- globals: eslintPluginJest.environments.globals.globals
9
- },
10
- rules: Object.assign(Object.assign({}, typescriptEslintJestRules), {
11
- 'jest/consistent-test-it': ['warn', {
12
- fn: 'test',
13
- withinDescribe: 'it'
14
- }],
15
- 'jest/expect-expect': ['error', {
16
- assertFunctionNames: ['expect', 'request.*.expect'],
17
- additionalTestBlockFunctions: []
18
- }],
19
- 'jest/max-expects': ['error', {
20
- max: 5
21
- }],
22
- 'jest/max-nested-describe': ['error', {
23
- max: 4
24
- }],
25
- 'jest/no-alias-methods': 'warn',
26
- 'jest/no-commented-out-tests': 'error',
27
- 'jest/no-conditional-expect': 'error',
28
- 'jest/no-conditional-in-test': 'error',
29
- 'jest/no-confusing-set-timeout': 'error',
30
- 'jest/no-deprecated-functions': 'warn',
31
- 'jest/no-disabled-tests': 'error',
32
- 'jest/no-done-callback': 'error',
33
- 'jest/no-duplicate-hooks': 'error',
34
- 'jest/no-export': 'error',
35
- 'jest/no-focused-tests': 'warn',
36
- 'jest/no-hooks': 'off',
37
- 'jest/no-identical-title': 'error',
38
- 'jest/no-interpolation-in-snapshots': 'error',
39
- 'jest/no-jasmine-globals': 'warn',
40
- 'jest/no-large-snapshots': 'error',
41
- 'jest/no-mocks-import': 'error',
42
- 'jest/no-restricted-jest-methods': 'off',
43
- 'jest/no-restricted-matchers': ['error', {
44
- toBeFalsy: 'Avoid `toBeFalsy`',
45
- toBeTruthy: 'Avoid `toBeTruthy`',
46
- toMatchSnapshot: 'Use `toMatchInlineSnapshot()` instead',
47
- toThrowErrorMatchingSnapshot: 'Use `toThrowErrorMatchingInlineSnapshot()` instead'
48
- }],
49
- 'jest/no-standalone-expect': 'error',
50
- 'jest/no-test-prefixes': 'warn',
51
- 'jest/no-test-return-statement': 'error',
52
- 'jest/no-untyped-mock-factory': 'warn',
53
- 'jest/padding-around-after-all-blocks': 'warn',
54
- 'jest/padding-around-after-each-blocks': 'warn',
55
- 'jest/padding-around-all': 'warn',
56
- 'jest/padding-around-before-all-blocks': 'warn',
57
- 'jest/padding-around-before-each-blocks': 'warn',
58
- 'jest/padding-around-describe-blocks': 'warn',
59
- 'jest/padding-around-expect-groups': 'warn',
60
- 'jest/padding-around-test-blocks': 'warn',
61
- 'jest/prefer-called-with': 'error',
62
- 'jest/prefer-comparison-matcher': 'warn',
63
- 'jest/prefer-each': 'error',
64
- 'jest/prefer-equality-matcher': 'error',
65
- 'jest/prefer-expect-assertions': 'off',
66
- 'jest/prefer-expect-resolves': 'warn',
67
- 'jest/prefer-hooks-in-order': 'error',
68
- 'jest/prefer-hooks-on-top': 'error',
69
- 'jest/prefer-importing-jest-globals': 'warn',
70
- 'jest/prefer-jest-mocked': 'warn',
71
- 'jest/prefer-lowercase-title': ['error', {
72
- allowedPrefixes: [],
73
- ignore: [],
74
- ignoreTopLevelDescribe: true
75
- }],
76
- 'jest/prefer-mock-promise-shorthand': 'warn',
77
- 'jest/prefer-snapshot-hint': ['error', 'always'],
78
- 'jest/prefer-spy-on': 'warn',
79
- 'jest/prefer-strict-equal': 'warn',
80
- 'jest/prefer-to-be': 'warn',
81
- 'jest/prefer-to-contain': 'warn',
82
- 'jest/prefer-to-have-length': 'warn',
83
- 'jest/prefer-todo': 'warn',
84
- 'jest/require-hook': ['error', {
85
- allowedFunctionCalls: []
86
- }],
87
- 'jest/require-to-throw-message': 'error',
88
- 'jest/require-top-level-describe': 'error',
89
- 'jest/valid-describe-callback': 'error',
90
- 'jest/valid-expect-in-promise': 'error',
91
- 'jest/valid-expect': 'error',
92
- 'jest/valid-title': ['warn', {
93
- ignoreTypeOfDescribeName: true,
94
- ignoreTypeOfTestName: false,
95
- ignoreSpaces: false
96
- }]
97
- })
98
- };
@@ -1,5 +0,0 @@
1
- export declare const typescriptEslintJestRules: {
2
- 'jest/unbound-method': (string | {
3
- ignoreStatic: boolean;
4
- })[];
5
- };
@@ -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,19 +0,0 @@
1
- import eslintPluginJestDom from 'eslint-plugin-jest-dom';
2
- export const jestDomConfig = {
3
- plugins: {
4
- 'jest-dom': eslintPluginJestDom
5
- },
6
- rules: {
7
- 'jest-dom/prefer-checked': 'warn',
8
- 'jest-dom/prefer-empty': 'warn',
9
- 'jest-dom/prefer-enabled-disabled': 'warn',
10
- 'jest-dom/prefer-focus': 'warn',
11
- 'jest-dom/prefer-in-document': 'off',
12
- 'jest-dom/prefer-required': 'warn',
13
- 'jest-dom/prefer-to-have-attribute': 'warn',
14
- 'jest-dom/prefer-to-have-class': 'warn',
15
- 'jest-dom/prefer-to-have-style': 'warn',
16
- 'jest-dom/prefer-to-have-text-content': 'warn',
17
- 'jest-dom/prefer-to-have-value': 'warn'
18
- }
19
- };