@egy186/eslint-config 3.6.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -61,19 +61,6 @@ import { typescriptConfig } from '@egy186/eslint-config/typescript';
61
61
  export default [base, typescriptConfig({ projectService: { allowDefaultProject: ['*.ts'] } })];
62
62
  ```
63
63
 
64
- Jest:
65
-
66
- ```sh
67
- npm install -D eslint-plugin-jest
68
- ```
69
-
70
- ```js
71
- import { base } from '@egy186/eslint-config';
72
- import { jest } from '@egy186/eslint-config/jest';
73
-
74
- export default [base, jest];
75
- ```
76
-
77
64
  Vitest:
78
65
 
79
66
  ```sh
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@egy186/eslint-config",
3
3
  "description": "Eslint shareable config",
4
- "version": "3.6.2",
4
+ "version": "4.0.0",
5
5
  "author": "egy186",
6
6
  "bugs": {
7
7
  "url": "https://github.com/egy186/eslint-config/issues"
@@ -19,7 +19,6 @@
19
19
  "@vitest/eslint-plugin": "~1.3.23",
20
20
  "eslint": "~9.38.0",
21
21
  "eslint-import-resolver-typescript": "~4.4.4",
22
- "eslint-plugin-jest": "~29.0.1",
23
22
  "eslint-plugin-react": "~7.37.5",
24
23
  "eslint-plugin-react-hooks": "~7.0.0",
25
24
  "husky": "^9.1.7",
@@ -35,10 +34,6 @@
35
34
  "types": "./dist/index.d.ts",
36
35
  "default": "./dist/index.js"
37
36
  },
38
- "./jest": {
39
- "types": "./dist/jest.d.ts",
40
- "default": "./dist/jest.js"
41
- },
42
37
  "./react": {
43
38
  "types": "./dist/react.d.ts",
44
39
  "default": "./dist/react.js"
@@ -69,7 +64,6 @@
69
64
  "@vitest/eslint-plugin": "^1.3.15",
70
65
  "eslint": "^9.35.0",
71
66
  "eslint-import-resolver-typescript": "^4.2.2",
72
- "eslint-plugin-jest": "^29.0.1",
73
67
  "eslint-plugin-react": "^7.36.1",
74
68
  "eslint-plugin-react-hooks": "^7.0.0",
75
69
  "typescript": "^5.0.4",
@@ -85,9 +79,6 @@
85
79
  "eslint-import-resolver-typescript": {
86
80
  "optional": true
87
81
  },
88
- "eslint-plugin-jest": {
89
- "optional": true
90
- },
91
82
  "eslint-plugin-react": {
92
83
  "optional": true
93
84
  },
package/dist/jest.d.ts DELETED
@@ -1,121 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- /**
3
- * @deprecated Use `@egy186/eslint-config/vitest` instead.
4
- */
5
- declare const config: {
6
- readonly files: ["**/*.{spec,test}.{js,jsx,mjs,cjs}", "**/*.{spec,test}.{ts,tsx,mts,cts}"];
7
- readonly languageOptions: {
8
- readonly globals: {
9
- readonly afterAll: false;
10
- readonly afterEach: false;
11
- readonly beforeAll: false;
12
- readonly beforeEach: false;
13
- readonly describe: false;
14
- readonly expect: false;
15
- readonly fit: false;
16
- readonly it: false;
17
- readonly jest: false;
18
- readonly test: false;
19
- readonly xdescribe: false;
20
- readonly xit: false;
21
- readonly xtest: false;
22
- };
23
- };
24
- readonly plugins: {
25
- readonly jest: {
26
- meta: {
27
- name: string;
28
- version: string;
29
- };
30
- environments: {
31
- globals: {
32
- globals: {
33
- [key: string]: boolean;
34
- };
35
- };
36
- };
37
- configs: {
38
- all: Linter.LegacyConfig;
39
- recommended: Linter.LegacyConfig;
40
- style: Linter.LegacyConfig;
41
- "flat/all": Linter.FlatConfig;
42
- "flat/recommended": Linter.FlatConfig;
43
- "flat/style": Linter.FlatConfig;
44
- };
45
- rules: {
46
- [key: string]: import("eslint").Rule.RuleModule;
47
- };
48
- };
49
- };
50
- readonly rules: {
51
- readonly 'jest/consistent-test-it': "error";
52
- readonly 'jest/expect-expect': "error";
53
- readonly 'jest/max-expects': "error";
54
- readonly 'jest/max-nested-describe': "error";
55
- readonly 'jest/no-alias-methods': "error";
56
- readonly 'jest/no-commented-out-tests': "error";
57
- readonly 'jest/no-conditional-expect': "error";
58
- readonly 'jest/no-conditional-in-test': "error";
59
- readonly 'jest/no-confusing-set-timeout': "error";
60
- readonly 'jest/no-deprecated-functions': "error";
61
- readonly 'jest/no-disabled-tests': "error";
62
- readonly 'jest/no-done-callback': "error";
63
- readonly 'jest/no-duplicate-hooks': "error";
64
- readonly 'jest/no-export': "error";
65
- readonly 'jest/no-focused-tests': "error";
66
- readonly 'jest/no-hooks': "off";
67
- readonly 'jest/no-identical-title': "error";
68
- readonly 'jest/no-interpolation-in-snapshots': "error";
69
- readonly 'jest/no-jasmine-globals': "error";
70
- readonly 'jest/no-large-snapshots': "warn";
71
- readonly 'jest/no-mocks-import': "error";
72
- readonly 'jest/no-restricted-jest-methods': "off";
73
- readonly 'jest/no-restricted-matchers': "off";
74
- readonly 'jest/no-standalone-expect': "error";
75
- readonly 'jest/no-test-prefixes': "error";
76
- readonly 'jest/no-test-return-statement': "error";
77
- readonly 'jest/no-untyped-mock-factory': "warn";
78
- readonly 'jest/padding-around-after-all-blocks': "error";
79
- readonly 'jest/padding-around-after-each-blocks': "error";
80
- readonly 'jest/padding-around-all': "error";
81
- readonly 'jest/padding-around-before-all-blocks': "error";
82
- readonly 'jest/padding-around-before-each-blocks': "error";
83
- readonly 'jest/padding-around-describe-blocks': "error";
84
- readonly 'jest/padding-around-expect-groups': "error";
85
- readonly 'jest/padding-around-test-blocks': "error";
86
- readonly 'jest/prefer-called-with': "error";
87
- readonly 'jest/prefer-comparison-matcher': "error";
88
- readonly 'jest/prefer-each': "error";
89
- readonly 'jest/prefer-ending-with-an-expect': "error";
90
- readonly 'jest/prefer-equality-matcher': "error";
91
- readonly 'jest/prefer-expect-assertions': ["warn", {
92
- readonly onlyFunctionsWithAsyncKeyword: true;
93
- }];
94
- readonly 'jest/prefer-expect-resolves': "error";
95
- readonly 'jest/prefer-hooks-in-order': "error";
96
- readonly 'jest/prefer-hooks-on-top': "error";
97
- readonly 'jest/prefer-importing-jest-globals': "off";
98
- readonly 'jest/prefer-jest-mocked': "error";
99
- readonly 'jest/prefer-lowercase-title': "error";
100
- readonly 'jest/prefer-mock-promise-shorthand': "error";
101
- readonly 'jest/prefer-snapshot-hint': "error";
102
- readonly 'jest/prefer-spy-on': "error";
103
- readonly 'jest/prefer-strict-equal': "error";
104
- readonly 'jest/prefer-to-be': "error";
105
- readonly 'jest/prefer-to-contain': "error";
106
- readonly 'jest/prefer-to-have-length': "error";
107
- readonly 'jest/prefer-todo': "error";
108
- readonly 'jest/require-hook': "error";
109
- readonly 'jest/require-to-throw-message': "error";
110
- readonly 'jest/require-top-level-describe': "error";
111
- readonly 'jest/unbound-method': "error";
112
- readonly 'jest/valid-describe-callback': "error";
113
- readonly 'jest/valid-expect': "error";
114
- readonly 'jest/valid-expect-in-promise': "error";
115
- readonly 'jest/valid-title': "error";
116
- readonly 'max-lines-per-function': "off";
117
- readonly 'max-statements': "off";
118
- };
119
- };
120
- export { config as jest };
121
- export default config;
package/dist/jest.js DELETED
@@ -1,86 +0,0 @@
1
- import globals from 'globals';
2
- import jest from 'eslint-plugin-jest';
3
- process.emitWarning('`@egy186/eslint-config/jest` is deprecated. Use `@egy186/eslint-config/vitest` instead.', { type: 'DeprecationWarning' });
4
- /**
5
- * @deprecated Use `@egy186/eslint-config/vitest` instead.
6
- */
7
- const config = {
8
- files: ['**/*.{spec,test}.{js,jsx,mjs,cjs}', '**/*.{spec,test}.{ts,tsx,mts,cts}'],
9
- languageOptions: {
10
- globals: {
11
- ...globals.jest
12
- }
13
- },
14
- plugins: { jest },
15
- rules: {
16
- 'jest/consistent-test-it': 'error',
17
- 'jest/expect-expect': 'error',
18
- 'jest/max-expects': 'error',
19
- 'jest/max-nested-describe': 'error',
20
- 'jest/no-alias-methods': 'error',
21
- 'jest/no-commented-out-tests': 'error',
22
- 'jest/no-conditional-expect': 'error',
23
- 'jest/no-conditional-in-test': 'error',
24
- 'jest/no-confusing-set-timeout': 'error',
25
- 'jest/no-deprecated-functions': 'error',
26
- 'jest/no-disabled-tests': 'error',
27
- 'jest/no-done-callback': 'error',
28
- 'jest/no-duplicate-hooks': 'error',
29
- 'jest/no-export': 'error',
30
- 'jest/no-focused-tests': 'error',
31
- 'jest/no-hooks': 'off',
32
- 'jest/no-identical-title': 'error',
33
- 'jest/no-interpolation-in-snapshots': 'error',
34
- 'jest/no-jasmine-globals': 'error',
35
- 'jest/no-large-snapshots': 'warn',
36
- 'jest/no-mocks-import': 'error',
37
- 'jest/no-restricted-jest-methods': 'off',
38
- 'jest/no-restricted-matchers': 'off',
39
- 'jest/no-standalone-expect': 'error',
40
- 'jest/no-test-prefixes': 'error',
41
- 'jest/no-test-return-statement': 'error',
42
- 'jest/no-untyped-mock-factory': 'warn',
43
- 'jest/padding-around-after-all-blocks': 'error',
44
- 'jest/padding-around-after-each-blocks': 'error',
45
- 'jest/padding-around-all': 'error',
46
- 'jest/padding-around-before-all-blocks': 'error',
47
- 'jest/padding-around-before-each-blocks': 'error',
48
- 'jest/padding-around-describe-blocks': 'error',
49
- 'jest/padding-around-expect-groups': 'error',
50
- 'jest/padding-around-test-blocks': 'error',
51
- 'jest/prefer-called-with': 'error',
52
- 'jest/prefer-comparison-matcher': 'error',
53
- 'jest/prefer-each': 'error',
54
- 'jest/prefer-ending-with-an-expect': 'error',
55
- 'jest/prefer-equality-matcher': 'error',
56
- 'jest/prefer-expect-assertions': ['warn', { onlyFunctionsWithAsyncKeyword: true }],
57
- 'jest/prefer-expect-resolves': 'error',
58
- 'jest/prefer-hooks-in-order': 'error',
59
- 'jest/prefer-hooks-on-top': 'error',
60
- 'jest/prefer-importing-jest-globals': 'off',
61
- 'jest/prefer-jest-mocked': 'error',
62
- 'jest/prefer-lowercase-title': 'error',
63
- 'jest/prefer-mock-promise-shorthand': 'error',
64
- 'jest/prefer-snapshot-hint': 'error',
65
- 'jest/prefer-spy-on': 'error',
66
- 'jest/prefer-strict-equal': 'error',
67
- 'jest/prefer-to-be': 'error',
68
- 'jest/prefer-to-contain': 'error',
69
- 'jest/prefer-to-have-length': 'error',
70
- 'jest/prefer-todo': 'error',
71
- 'jest/require-hook': 'error',
72
- 'jest/require-to-throw-message': 'error',
73
- 'jest/require-top-level-describe': 'error',
74
- 'jest/unbound-method': 'error',
75
- 'jest/valid-describe-callback': 'error',
76
- 'jest/valid-expect': 'error',
77
- 'jest/valid-expect-in-promise': 'error',
78
- 'jest/valid-title': 'error',
79
- 'max-lines-per-function': 'off',
80
- 'max-statements': 'off'
81
- }
82
- };
83
- // eslint-disable-next-line @typescript-eslint/no-deprecated
84
- export { config as jest };
85
- // eslint-disable-next-line @typescript-eslint/no-deprecated
86
- export default config;