@egy186/eslint-config 3.6.2 → 4.1.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 +0 -13
- package/dist/base.d.ts +6 -0
- package/dist/browser.d.ts +7 -0
- package/dist/commonjs.d.ts +6 -0
- package/dist/rules/jsdoc-rules.d.ts +2 -0
- package/dist/rules/jsdoc-rules.js +8 -1
- package/dist/typescript.d.ts +2 -0
- package/dist/typescript.js +2 -0
- package/dist/vitest.d.ts +180 -2
- package/dist/vitest.js +12 -1
- package/package.json +11 -20
- package/dist/jest.d.ts +0 -121
- package/dist/jest.js +0 -86
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/dist/base.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const config: {
|
|
|
30
30
|
readonly DecompressionStream: false;
|
|
31
31
|
readonly DisposableStack: false;
|
|
32
32
|
readonly DOMException: false;
|
|
33
|
+
readonly ErrorEvent: false;
|
|
33
34
|
readonly Event: false;
|
|
34
35
|
readonly EventTarget: false;
|
|
35
36
|
readonly exports: true;
|
|
@@ -38,6 +39,7 @@ declare const config: {
|
|
|
38
39
|
readonly FormData: false;
|
|
39
40
|
readonly global: false;
|
|
40
41
|
readonly Headers: false;
|
|
42
|
+
readonly localStorage: false;
|
|
41
43
|
readonly MessageChannel: false;
|
|
42
44
|
readonly MessageEvent: false;
|
|
43
45
|
readonly MessagePort: false;
|
|
@@ -63,9 +65,11 @@ declare const config: {
|
|
|
63
65
|
readonly Request: false;
|
|
64
66
|
readonly require: false;
|
|
65
67
|
readonly Response: false;
|
|
68
|
+
readonly sessionStorage: false;
|
|
66
69
|
readonly setImmediate: false;
|
|
67
70
|
readonly setInterval: false;
|
|
68
71
|
readonly setTimeout: false;
|
|
72
|
+
readonly Storage: false;
|
|
69
73
|
readonly structuredClone: false;
|
|
70
74
|
readonly SubtleCrypto: false;
|
|
71
75
|
readonly SuppressedError: false;
|
|
@@ -430,6 +434,7 @@ declare const config: {
|
|
|
430
434
|
readonly 'jsdoc/require-property-description': "error";
|
|
431
435
|
readonly 'jsdoc/require-property-name': "error";
|
|
432
436
|
readonly 'jsdoc/require-property-type': "error";
|
|
437
|
+
readonly 'jsdoc/require-rejects': "error";
|
|
433
438
|
readonly 'jsdoc/require-returns': "error";
|
|
434
439
|
readonly 'jsdoc/require-returns-check': "error";
|
|
435
440
|
readonly 'jsdoc/require-returns-description': "error";
|
|
@@ -456,6 +461,7 @@ declare const config: {
|
|
|
456
461
|
readonly 'jsdoc/ts-no-unnecessary-template-expression': "error";
|
|
457
462
|
readonly 'jsdoc/ts-prefer-function-type': "error";
|
|
458
463
|
readonly 'jsdoc/type-formatting': ["error", {
|
|
464
|
+
readonly arrayBrackets: "angle";
|
|
459
465
|
readonly stringQuotes: "single";
|
|
460
466
|
}];
|
|
461
467
|
readonly 'jsdoc/valid-types': "error";
|
package/dist/browser.d.ts
CHANGED
|
@@ -204,6 +204,7 @@ declare const config: {
|
|
|
204
204
|
readonly DeviceOrientationEvent: false;
|
|
205
205
|
readonly devicePixelRatio: false;
|
|
206
206
|
readonly DevicePosture: false;
|
|
207
|
+
readonly DigitalCredential: false;
|
|
207
208
|
readonly dispatchEvent: false;
|
|
208
209
|
readonly DisposableStack: false;
|
|
209
210
|
readonly document: false;
|
|
@@ -431,6 +432,7 @@ declare const config: {
|
|
|
431
432
|
readonly IDBKeyRange: false;
|
|
432
433
|
readonly IDBObjectStore: false;
|
|
433
434
|
readonly IDBOpenDBRequest: false;
|
|
435
|
+
readonly IDBRecord: false;
|
|
434
436
|
readonly IDBRequest: false;
|
|
435
437
|
readonly IDBTransaction: false;
|
|
436
438
|
readonly IDBVersionChangeEvent: false;
|
|
@@ -456,6 +458,7 @@ declare const config: {
|
|
|
456
458
|
readonly InputDeviceInfo: false;
|
|
457
459
|
readonly InputEvent: false;
|
|
458
460
|
readonly IntegrityViolationReportBody: false;
|
|
461
|
+
readonly InterestEvent: false;
|
|
459
462
|
readonly IntersectionObserver: false;
|
|
460
463
|
readonly IntersectionObserverEntry: false;
|
|
461
464
|
readonly isSecureContext: false;
|
|
@@ -545,6 +548,7 @@ declare const config: {
|
|
|
545
548
|
readonly NavigationCurrentEntryChangeEvent: false;
|
|
546
549
|
readonly NavigationDestination: false;
|
|
547
550
|
readonly NavigationHistoryEntry: false;
|
|
551
|
+
readonly NavigationPrecommitController: false;
|
|
548
552
|
readonly NavigationPreloadManager: false;
|
|
549
553
|
readonly NavigationTransition: false;
|
|
550
554
|
readonly navigator: false;
|
|
@@ -875,6 +879,7 @@ declare const config: {
|
|
|
875
879
|
readonly SpeechRecognition: false;
|
|
876
880
|
readonly SpeechRecognitionErrorEvent: false;
|
|
877
881
|
readonly SpeechRecognitionEvent: false;
|
|
882
|
+
readonly SpeechRecognitionPhrase: false;
|
|
878
883
|
readonly speechSynthesis: false;
|
|
879
884
|
readonly SpeechSynthesis: false;
|
|
880
885
|
readonly SpeechSynthesisErrorEvent: false;
|
|
@@ -1470,6 +1475,7 @@ declare const config: {
|
|
|
1470
1475
|
readonly 'jsdoc/require-property-description': "error";
|
|
1471
1476
|
readonly 'jsdoc/require-property-name': "error";
|
|
1472
1477
|
readonly 'jsdoc/require-property-type': "error";
|
|
1478
|
+
readonly 'jsdoc/require-rejects': "error";
|
|
1473
1479
|
readonly 'jsdoc/require-returns': "error";
|
|
1474
1480
|
readonly 'jsdoc/require-returns-check': "error";
|
|
1475
1481
|
readonly 'jsdoc/require-returns-description': "error";
|
|
@@ -1496,6 +1502,7 @@ declare const config: {
|
|
|
1496
1502
|
readonly 'jsdoc/ts-no-unnecessary-template-expression': "error";
|
|
1497
1503
|
readonly 'jsdoc/ts-prefer-function-type': "error";
|
|
1498
1504
|
readonly 'jsdoc/type-formatting': ["error", {
|
|
1505
|
+
readonly arrayBrackets: "angle";
|
|
1499
1506
|
readonly stringQuotes: "single";
|
|
1500
1507
|
}];
|
|
1501
1508
|
readonly 'jsdoc/valid-types': "error";
|
package/dist/commonjs.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const config: {
|
|
|
30
30
|
readonly DecompressionStream: false;
|
|
31
31
|
readonly DisposableStack: false;
|
|
32
32
|
readonly DOMException: false;
|
|
33
|
+
readonly ErrorEvent: false;
|
|
33
34
|
readonly Event: false;
|
|
34
35
|
readonly EventTarget: false;
|
|
35
36
|
readonly exports: true;
|
|
@@ -38,6 +39,7 @@ declare const config: {
|
|
|
38
39
|
readonly FormData: false;
|
|
39
40
|
readonly global: false;
|
|
40
41
|
readonly Headers: false;
|
|
42
|
+
readonly localStorage: false;
|
|
41
43
|
readonly MessageChannel: false;
|
|
42
44
|
readonly MessageEvent: false;
|
|
43
45
|
readonly MessagePort: false;
|
|
@@ -63,9 +65,11 @@ declare const config: {
|
|
|
63
65
|
readonly Request: false;
|
|
64
66
|
readonly require: false;
|
|
65
67
|
readonly Response: false;
|
|
68
|
+
readonly sessionStorage: false;
|
|
66
69
|
readonly setImmediate: false;
|
|
67
70
|
readonly setInterval: false;
|
|
68
71
|
readonly setTimeout: false;
|
|
72
|
+
readonly Storage: false;
|
|
69
73
|
readonly structuredClone: false;
|
|
70
74
|
readonly SubtleCrypto: false;
|
|
71
75
|
readonly SuppressedError: false;
|
|
@@ -384,6 +388,7 @@ declare const config: {
|
|
|
384
388
|
readonly 'jsdoc/require-property-description': "error";
|
|
385
389
|
readonly 'jsdoc/require-property-name': "error";
|
|
386
390
|
readonly 'jsdoc/require-property-type': "error";
|
|
391
|
+
readonly 'jsdoc/require-rejects': "error";
|
|
387
392
|
readonly 'jsdoc/require-returns': "error";
|
|
388
393
|
readonly 'jsdoc/require-returns-check': "error";
|
|
389
394
|
readonly 'jsdoc/require-returns-description': "error";
|
|
@@ -410,6 +415,7 @@ declare const config: {
|
|
|
410
415
|
readonly 'jsdoc/ts-no-unnecessary-template-expression': "error";
|
|
411
416
|
readonly 'jsdoc/ts-prefer-function-type': "error";
|
|
412
417
|
readonly 'jsdoc/type-formatting': ["error", {
|
|
418
|
+
readonly arrayBrackets: "angle";
|
|
413
419
|
readonly stringQuotes: "single";
|
|
414
420
|
}];
|
|
415
421
|
readonly 'jsdoc/valid-types': "error";
|
|
@@ -52,6 +52,7 @@ declare const rules: {
|
|
|
52
52
|
readonly 'jsdoc/require-property-description': "error";
|
|
53
53
|
readonly 'jsdoc/require-property-name': "error";
|
|
54
54
|
readonly 'jsdoc/require-property-type': "error";
|
|
55
|
+
readonly 'jsdoc/require-rejects': "error";
|
|
55
56
|
readonly 'jsdoc/require-returns': "error";
|
|
56
57
|
readonly 'jsdoc/require-returns-check': "error";
|
|
57
58
|
readonly 'jsdoc/require-returns-description': "error";
|
|
@@ -78,6 +79,7 @@ declare const rules: {
|
|
|
78
79
|
readonly 'jsdoc/ts-no-unnecessary-template-expression': "error";
|
|
79
80
|
readonly 'jsdoc/ts-prefer-function-type': "error";
|
|
80
81
|
readonly 'jsdoc/type-formatting': ["error", {
|
|
82
|
+
readonly arrayBrackets: "angle";
|
|
81
83
|
readonly stringQuotes: "single";
|
|
82
84
|
}];
|
|
83
85
|
readonly 'jsdoc/valid-types': "error";
|
|
@@ -50,6 +50,7 @@ const rules = {
|
|
|
50
50
|
'jsdoc/require-property-description': 'error',
|
|
51
51
|
'jsdoc/require-property-name': 'error',
|
|
52
52
|
'jsdoc/require-property-type': 'error',
|
|
53
|
+
'jsdoc/require-rejects': 'error',
|
|
53
54
|
'jsdoc/require-returns': 'error',
|
|
54
55
|
'jsdoc/require-returns-check': 'error',
|
|
55
56
|
'jsdoc/require-returns-description': 'error',
|
|
@@ -75,7 +76,13 @@ const rules = {
|
|
|
75
76
|
'jsdoc/ts-no-empty-object-type': 'error',
|
|
76
77
|
'jsdoc/ts-no-unnecessary-template-expression': 'error',
|
|
77
78
|
'jsdoc/ts-prefer-function-type': 'error',
|
|
78
|
-
'jsdoc/type-formatting': [
|
|
79
|
+
'jsdoc/type-formatting': [
|
|
80
|
+
'error',
|
|
81
|
+
{
|
|
82
|
+
arrayBrackets: 'angle',
|
|
83
|
+
stringQuotes: 'single'
|
|
84
|
+
}
|
|
85
|
+
],
|
|
79
86
|
'jsdoc/valid-types': 'error'
|
|
80
87
|
};
|
|
81
88
|
export default rules;
|
package/dist/typescript.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ declare const config: {
|
|
|
133
133
|
readonly '@typescript-eslint/no-unused-expressions': ["error", {
|
|
134
134
|
readonly enforceForJSX: true;
|
|
135
135
|
}];
|
|
136
|
+
readonly '@typescript-eslint/no-unused-private-class-members': "error";
|
|
136
137
|
readonly '@typescript-eslint/no-unused-vars': ["error", {
|
|
137
138
|
readonly argsIgnorePattern: "^_";
|
|
138
139
|
readonly caughtErrorsIgnorePattern: "^_";
|
|
@@ -201,6 +202,7 @@ declare const config: {
|
|
|
201
202
|
readonly 'no-shadow': "off";
|
|
202
203
|
readonly 'no-throw-literal': "off";
|
|
203
204
|
readonly 'no-unused-expressions': "off";
|
|
205
|
+
readonly 'no-unused-private-class-members': "off";
|
|
204
206
|
readonly 'no-unused-vars': "off";
|
|
205
207
|
readonly 'no-use-before-define': "off";
|
|
206
208
|
readonly 'no-useless-constructor': "off";
|
package/dist/typescript.js
CHANGED
|
@@ -137,6 +137,7 @@ const config = {
|
|
|
137
137
|
'@typescript-eslint/no-unsafe-type-assertion': 'off',
|
|
138
138
|
'@typescript-eslint/no-unsafe-unary-minus': 'error',
|
|
139
139
|
'@typescript-eslint/no-unused-expressions': ['error', { enforceForJSX: true }],
|
|
140
|
+
'@typescript-eslint/no-unused-private-class-members': 'error',
|
|
140
141
|
'@typescript-eslint/no-unused-vars': [
|
|
141
142
|
'error',
|
|
142
143
|
{
|
|
@@ -206,6 +207,7 @@ const config = {
|
|
|
206
207
|
'no-shadow': 'off',
|
|
207
208
|
'no-throw-literal': 'off',
|
|
208
209
|
'no-unused-expressions': 'off',
|
|
210
|
+
'no-unused-private-class-members': 'off',
|
|
209
211
|
'no-unused-vars': 'off',
|
|
210
212
|
'no-use-before-define': 'off',
|
|
211
213
|
'no-useless-constructor': 'off',
|
package/dist/vitest.d.ts
CHANGED
|
@@ -1,8 +1,178 @@
|
|
|
1
|
-
import type { ESLint } from 'eslint';
|
|
2
1
|
declare const config: {
|
|
3
2
|
readonly files: ["**/*.{spec,test}.{js,jsx,mjs,cjs}", "**/*.{spec,test}.{ts,tsx,mts,cts}"];
|
|
4
3
|
readonly plugins: {
|
|
5
|
-
readonly vitest:
|
|
4
|
+
readonly vitest: {
|
|
5
|
+
readonly meta: {
|
|
6
|
+
readonly name: "vitest";
|
|
7
|
+
readonly version: string;
|
|
8
|
+
};
|
|
9
|
+
readonly rules: Record<string, import("eslint").Rule.RuleModule>;
|
|
10
|
+
readonly environments: {
|
|
11
|
+
readonly env: {
|
|
12
|
+
readonly globals: {
|
|
13
|
+
readonly suite: true;
|
|
14
|
+
readonly test: true;
|
|
15
|
+
readonly describe: true;
|
|
16
|
+
readonly it: true;
|
|
17
|
+
readonly expectTypeOf: true;
|
|
18
|
+
readonly assertType: true;
|
|
19
|
+
readonly expect: true;
|
|
20
|
+
readonly assert: true;
|
|
21
|
+
readonly chai: true;
|
|
22
|
+
readonly vitest: true;
|
|
23
|
+
readonly vi: true;
|
|
24
|
+
readonly beforeAll: true;
|
|
25
|
+
readonly afterAll: true;
|
|
26
|
+
readonly beforeEach: true;
|
|
27
|
+
readonly afterEach: true;
|
|
28
|
+
readonly onTestFailed: true;
|
|
29
|
+
readonly onTestFinished: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly configs: {
|
|
34
|
+
readonly "legacy-recommended": {
|
|
35
|
+
plugins: string[];
|
|
36
|
+
rules: {};
|
|
37
|
+
};
|
|
38
|
+
readonly "legacy-all": {
|
|
39
|
+
plugins: string[];
|
|
40
|
+
rules: {};
|
|
41
|
+
};
|
|
42
|
+
readonly recommended: {
|
|
43
|
+
readonly name: "vitest/recommended";
|
|
44
|
+
readonly plugins: {
|
|
45
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
46
|
+
};
|
|
47
|
+
readonly rules: {
|
|
48
|
+
readonly "vitest/expect-expect": "error";
|
|
49
|
+
readonly "vitest/no-conditional-expect": "error";
|
|
50
|
+
readonly "vitest/no-disabled-tests": "warn";
|
|
51
|
+
readonly "vitest/no-focused-tests": "error";
|
|
52
|
+
readonly "vitest/no-commented-out-tests": "error";
|
|
53
|
+
readonly "vitest/no-identical-title": "error";
|
|
54
|
+
readonly "vitest/no-import-node-test": "error";
|
|
55
|
+
readonly "vitest/no-interpolation-in-snapshots": "error";
|
|
56
|
+
readonly "vitest/no-mocks-import": "error";
|
|
57
|
+
readonly "vitest/no-standalone-expect": "error";
|
|
58
|
+
readonly "vitest/prefer-called-exactly-once-with": "error";
|
|
59
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
60
|
+
readonly "vitest/valid-describe-callback": "error";
|
|
61
|
+
readonly "vitest/valid-expect": "error";
|
|
62
|
+
readonly "vitest/valid-expect-in-promise": "error";
|
|
63
|
+
readonly "vitest/valid-title": "error";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly all: {
|
|
67
|
+
readonly name: "vitest/all";
|
|
68
|
+
readonly plugins: {
|
|
69
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
70
|
+
};
|
|
71
|
+
readonly rules: {
|
|
72
|
+
readonly "vitest/consistent-test-filename": "warn";
|
|
73
|
+
readonly "vitest/consistent-test-it": "warn";
|
|
74
|
+
readonly "vitest/consistent-each-for": "warn";
|
|
75
|
+
readonly "vitest/consistent-vitest-vi": "warn";
|
|
76
|
+
readonly "vitest/expect-expect": "warn";
|
|
77
|
+
readonly "vitest/hoisted-apis-on-top": "warn";
|
|
78
|
+
readonly "vitest/max-expects": "warn";
|
|
79
|
+
readonly "vitest/max-nested-describe": "warn";
|
|
80
|
+
readonly "vitest/no-alias-methods": "warn";
|
|
81
|
+
readonly "vitest/no-commented-out-tests": "warn";
|
|
82
|
+
readonly "vitest/no-conditional-expect": "warn";
|
|
83
|
+
readonly "vitest/no-conditional-in-test": "warn";
|
|
84
|
+
readonly "vitest/no-conditional-tests": "warn";
|
|
85
|
+
readonly "vitest/no-disabled-tests": "warn";
|
|
86
|
+
readonly "vitest/no-duplicate-hooks": "warn";
|
|
87
|
+
readonly "vitest/no-focused-tests": "warn";
|
|
88
|
+
readonly "vitest/no-hooks": "warn";
|
|
89
|
+
readonly "vitest/no-identical-title": "warn";
|
|
90
|
+
readonly "vitest/no-import-node-test": "warn";
|
|
91
|
+
readonly "vitest/no-importing-vitest-globals": "off";
|
|
92
|
+
readonly "vitest/no-interpolation-in-snapshots": "warn";
|
|
93
|
+
readonly "vitest/no-large-snapshots": "warn";
|
|
94
|
+
readonly "vitest/no-mocks-import": "warn";
|
|
95
|
+
readonly "vitest/no-restricted-matchers": "warn";
|
|
96
|
+
readonly "vitest/no-restricted-vi-methods": "warn";
|
|
97
|
+
readonly "vitest/no-standalone-expect": "warn";
|
|
98
|
+
readonly "vitest/no-test-prefixes": "warn";
|
|
99
|
+
readonly "vitest/no-test-return-statement": "warn";
|
|
100
|
+
readonly "vitest/padding-around-after-all-blocks": "warn";
|
|
101
|
+
readonly "vitest/padding-around-after-each-blocks": "warn";
|
|
102
|
+
readonly "vitest/padding-around-all": "warn";
|
|
103
|
+
readonly "vitest/padding-around-before-all-blocks": "warn";
|
|
104
|
+
readonly "vitest/padding-around-before-each-blocks": "warn";
|
|
105
|
+
readonly "vitest/padding-around-describe-blocks": "warn";
|
|
106
|
+
readonly "vitest/padding-around-expect-groups": "warn";
|
|
107
|
+
readonly "vitest/padding-around-test-blocks": "warn";
|
|
108
|
+
readonly "vitest/prefer-called-exactly-once-with": "warn";
|
|
109
|
+
readonly "vitest/prefer-called-once": "off";
|
|
110
|
+
readonly "vitest/prefer-called-times": "warn";
|
|
111
|
+
readonly "vitest/prefer-called-with": "warn";
|
|
112
|
+
readonly "vitest/prefer-comparison-matcher": "warn";
|
|
113
|
+
readonly "vitest/prefer-describe-function-title": "warn";
|
|
114
|
+
readonly "vitest/prefer-each": "warn";
|
|
115
|
+
readonly "vitest/prefer-equality-matcher": "warn";
|
|
116
|
+
readonly "vitest/prefer-expect-assertions": "warn";
|
|
117
|
+
readonly "vitest/prefer-expect-resolves": "warn";
|
|
118
|
+
readonly "vitest/prefer-expect-type-of": "warn";
|
|
119
|
+
readonly "vitest/prefer-hooks-in-order": "warn";
|
|
120
|
+
readonly "vitest/prefer-hooks-on-top": "warn";
|
|
121
|
+
readonly "vitest/prefer-import-in-mock": "warn";
|
|
122
|
+
readonly "vitest/prefer-importing-vitest-globals": "warn";
|
|
123
|
+
readonly "vitest/prefer-lowercase-title": "warn";
|
|
124
|
+
readonly "vitest/prefer-mock-promise-shorthand": "warn";
|
|
125
|
+
readonly "vitest/prefer-snapshot-hint": "warn";
|
|
126
|
+
readonly "vitest/prefer-spy-on": "warn";
|
|
127
|
+
readonly "vitest/prefer-strict-boolean-matchers": "warn";
|
|
128
|
+
readonly "vitest/prefer-strict-equal": "warn";
|
|
129
|
+
readonly "vitest/prefer-to-be-falsy": "off";
|
|
130
|
+
readonly "vitest/prefer-to-be-object": "warn";
|
|
131
|
+
readonly "vitest/prefer-to-be-truthy": "off";
|
|
132
|
+
readonly "vitest/prefer-to-be": "warn";
|
|
133
|
+
readonly "vitest/prefer-to-contain": "warn";
|
|
134
|
+
readonly "vitest/prefer-to-have-length": "warn";
|
|
135
|
+
readonly "vitest/prefer-todo": "warn";
|
|
136
|
+
readonly "vitest/prefer-vi-mocked": "warn";
|
|
137
|
+
readonly "vitest/require-hook": "warn";
|
|
138
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "warn";
|
|
139
|
+
readonly "vitest/require-mock-type-parameters": "warn";
|
|
140
|
+
readonly "vitest/require-to-throw-message": "warn";
|
|
141
|
+
readonly "vitest/require-top-level-describe": "warn";
|
|
142
|
+
readonly "vitest/valid-describe-callback": "warn";
|
|
143
|
+
readonly "vitest/valid-expect-in-promise": "warn";
|
|
144
|
+
readonly "vitest/valid-expect": "warn";
|
|
145
|
+
readonly "vitest/valid-title": "warn";
|
|
146
|
+
readonly "vitest/require-awaited-expect-poll": "warn";
|
|
147
|
+
readonly "vitest/require-import-vi-mock": "warn";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
readonly env: {
|
|
151
|
+
readonly name: "vitest/env";
|
|
152
|
+
readonly languageOptions: {
|
|
153
|
+
readonly globals: {
|
|
154
|
+
readonly suite: "writable";
|
|
155
|
+
readonly test: "writable";
|
|
156
|
+
readonly describe: "writable";
|
|
157
|
+
readonly it: "writable";
|
|
158
|
+
readonly expectTypeOf: "writable";
|
|
159
|
+
readonly assertType: "writable";
|
|
160
|
+
readonly expect: "writable";
|
|
161
|
+
readonly assert: "writable";
|
|
162
|
+
readonly chai: "writable";
|
|
163
|
+
readonly vitest: "writable";
|
|
164
|
+
readonly vi: "writable";
|
|
165
|
+
readonly beforeAll: "writable";
|
|
166
|
+
readonly afterAll: "writable";
|
|
167
|
+
readonly beforeEach: "writable";
|
|
168
|
+
readonly afterEach: "writable";
|
|
169
|
+
readonly onTestFailed: "writable";
|
|
170
|
+
readonly onTestFinished: "writable";
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
6
176
|
};
|
|
7
177
|
readonly rules: {
|
|
8
178
|
readonly 'max-lines-per-function': "off";
|
|
@@ -10,6 +180,12 @@ declare const config: {
|
|
|
10
180
|
readonly 'n/no-unpublished-import': ["error", {
|
|
11
181
|
readonly allowModules: readonly ["vitest"];
|
|
12
182
|
}];
|
|
183
|
+
readonly 'vitest/consistent-each-for': ["error", {
|
|
184
|
+
readonly describe: "each";
|
|
185
|
+
readonly it: "for";
|
|
186
|
+
readonly suite: "each";
|
|
187
|
+
readonly test: "for";
|
|
188
|
+
}];
|
|
13
189
|
readonly 'vitest/consistent-test-filename': "error";
|
|
14
190
|
readonly 'vitest/consistent-test-it': "error";
|
|
15
191
|
readonly 'vitest/consistent-vitest-vi': "error";
|
|
@@ -76,7 +252,9 @@ declare const config: {
|
|
|
76
252
|
readonly 'vitest/prefer-to-have-length': "error";
|
|
77
253
|
readonly 'vitest/prefer-todo': "error";
|
|
78
254
|
readonly 'vitest/prefer-vi-mocked': "error";
|
|
255
|
+
readonly 'vitest/require-awaited-expect-poll': "error";
|
|
79
256
|
readonly 'vitest/require-hook': "error";
|
|
257
|
+
readonly 'vitest/require-import-vi-mock': "error";
|
|
80
258
|
readonly 'vitest/require-local-test-context-for-concurrent-snapshots': "error";
|
|
81
259
|
readonly 'vitest/require-mock-type-parameters': "error";
|
|
82
260
|
readonly 'vitest/require-to-throw-message': "error";
|
package/dist/vitest.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vitest from '@vitest/eslint-plugin';
|
|
2
2
|
const config = {
|
|
3
3
|
files: ['**/*.{spec,test}.{js,jsx,mjs,cjs}', '**/*.{spec,test}.{ts,tsx,mts,cts}'],
|
|
4
|
-
plugins: { vitest
|
|
4
|
+
plugins: { vitest },
|
|
5
5
|
rules: {
|
|
6
6
|
'max-lines-per-function': 'off',
|
|
7
7
|
'max-statements': 'off',
|
|
@@ -11,6 +11,15 @@ const config = {
|
|
|
11
11
|
allowModules: ['vitest']
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
+
'vitest/consistent-each-for': [
|
|
15
|
+
'error',
|
|
16
|
+
{
|
|
17
|
+
describe: 'each',
|
|
18
|
+
it: 'for',
|
|
19
|
+
suite: 'each',
|
|
20
|
+
test: 'for'
|
|
21
|
+
}
|
|
22
|
+
],
|
|
14
23
|
'vitest/consistent-test-filename': 'error',
|
|
15
24
|
'vitest/consistent-test-it': 'error',
|
|
16
25
|
'vitest/consistent-vitest-vi': 'error',
|
|
@@ -75,7 +84,9 @@ const config = {
|
|
|
75
84
|
'vitest/prefer-to-have-length': 'error',
|
|
76
85
|
'vitest/prefer-todo': 'error',
|
|
77
86
|
'vitest/prefer-vi-mocked': 'error',
|
|
87
|
+
'vitest/require-awaited-expect-poll': 'error',
|
|
78
88
|
'vitest/require-hook': 'error',
|
|
89
|
+
'vitest/require-import-vi-mock': 'error',
|
|
79
90
|
'vitest/require-local-test-context-for-concurrent-snapshots': 'error',
|
|
80
91
|
'vitest/require-mock-type-parameters': 'error',
|
|
81
92
|
'vitest/require-to-throw-message': 'error',
|
package/package.json
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@stylistic/eslint-plugin": "~5.
|
|
10
|
+
"@stylistic/eslint-plugin": "~5.6.1",
|
|
11
11
|
"eslint-plugin-import": "~2.32.0",
|
|
12
|
-
"eslint-plugin-jsdoc": "~61.1
|
|
12
|
+
"eslint-plugin-jsdoc": "~61.4.1",
|
|
13
13
|
"eslint-plugin-n": "~17.23.1",
|
|
14
|
-
"globals": "^16.
|
|
14
|
+
"globals": "^16.5.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@eslint/js": "~9.
|
|
18
|
-
"@types/node": "^24.
|
|
19
|
-
"@vitest/eslint-plugin": "~1.
|
|
20
|
-
"eslint": "~9.
|
|
17
|
+
"@eslint/js": "~9.39.1",
|
|
18
|
+
"@types/node": "^24.10.1",
|
|
19
|
+
"@vitest/eslint-plugin": "~1.5.0",
|
|
20
|
+
"eslint": "~9.39.1",
|
|
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
|
-
"eslint-plugin-react-hooks": "~7.0.
|
|
23
|
+
"eslint-plugin-react-hooks": "~7.0.1",
|
|
25
24
|
"husky": "^9.1.7",
|
|
26
25
|
"jiti": "^2.6.1",
|
|
27
26
|
"typescript": "~5.9.3",
|
|
28
|
-
"typescript-eslint": "~8.
|
|
27
|
+
"typescript-eslint": "~8.48.0"
|
|
29
28
|
},
|
|
30
29
|
"engines": {
|
|
31
30
|
"node": ">=20.19.2"
|
|
@@ -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"
|
|
@@ -66,10 +61,9 @@
|
|
|
66
61
|
"license": "MIT",
|
|
67
62
|
"main": "./dist/index.js",
|
|
68
63
|
"peerDependencies": {
|
|
69
|
-
"@vitest/eslint-plugin": "^1.
|
|
64
|
+
"@vitest/eslint-plugin": "^1.5.0",
|
|
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;
|