@egy186/eslint-config 2.1.1 → 2.3.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 +9 -0
- package/dist/base.d.ts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/commonjs.d.ts +1 -1
- package/dist/jest.d.ts +26 -3
- package/dist/jest.js +2 -3
- package/dist/typescript.d.ts +2 -0
- package/dist/typescript.js +2 -0
- package/dist/vitest.d.ts +269 -0
- package/dist/vitest.js +78 -0
- package/package.json +22 -15
package/README.md
CHANGED
|
@@ -57,3 +57,12 @@ import { jest } from '@egy186/eslint-config/jest';
|
|
|
57
57
|
|
|
58
58
|
export default [base, jest];
|
|
59
59
|
```
|
|
60
|
+
|
|
61
|
+
Vitest:
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
import { base } from '@egy186/eslint-config';
|
|
65
|
+
import { vitest } from '@egy186/eslint-config/vitest';
|
|
66
|
+
|
|
67
|
+
export default [base, vitest];
|
|
68
|
+
```
|
package/dist/base.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const config: {
|
|
|
18
18
|
readonly clearImmediate: false;
|
|
19
19
|
readonly clearInterval: false;
|
|
20
20
|
readonly clearTimeout: false;
|
|
21
|
+
readonly CloseEvent: false;
|
|
21
22
|
readonly CompressionStream: false;
|
|
22
23
|
readonly console: false;
|
|
23
24
|
readonly CountQueuingStrategy: false;
|
|
@@ -35,7 +36,6 @@ declare const config: {
|
|
|
35
36
|
readonly FormData: false;
|
|
36
37
|
readonly global: false;
|
|
37
38
|
readonly Headers: false;
|
|
38
|
-
readonly Iterator: false;
|
|
39
39
|
readonly MessageChannel: false;
|
|
40
40
|
readonly MessageEvent: false;
|
|
41
41
|
readonly MessagePort: false;
|
package/dist/browser.d.ts
CHANGED
|
@@ -144,6 +144,7 @@ declare const config: {
|
|
|
144
144
|
readonly CSSMatrixComponent: false;
|
|
145
145
|
readonly CSSMediaRule: false;
|
|
146
146
|
readonly CSSNamespaceRule: false;
|
|
147
|
+
readonly CSSNestedDeclarations: false;
|
|
147
148
|
readonly CSSNumericArray: false;
|
|
148
149
|
readonly CSSNumericValue: false;
|
|
149
150
|
readonly CSSPageDescriptors: false;
|
|
@@ -444,7 +445,6 @@ declare const config: {
|
|
|
444
445
|
readonly IntersectionObserver: false;
|
|
445
446
|
readonly IntersectionObserverEntry: false;
|
|
446
447
|
readonly isSecureContext: false;
|
|
447
|
-
readonly Iterator: false;
|
|
448
448
|
readonly Keyboard: false;
|
|
449
449
|
readonly KeyboardEvent: false;
|
|
450
450
|
readonly KeyboardLayoutMap: false;
|
package/dist/commonjs.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const config: {
|
|
|
18
18
|
readonly clearImmediate: false;
|
|
19
19
|
readonly clearInterval: false;
|
|
20
20
|
readonly clearTimeout: false;
|
|
21
|
+
readonly CloseEvent: false;
|
|
21
22
|
readonly CompressionStream: false;
|
|
22
23
|
readonly console: false;
|
|
23
24
|
readonly CountQueuingStrategy: false;
|
|
@@ -35,7 +36,6 @@ declare const config: {
|
|
|
35
36
|
readonly FormData: false;
|
|
36
37
|
readonly global: false;
|
|
37
38
|
readonly Headers: false;
|
|
38
|
-
readonly Iterator: false;
|
|
39
39
|
readonly MessageChannel: false;
|
|
40
40
|
readonly MessageEvent: false;
|
|
41
41
|
readonly MessagePort: false;
|
package/dist/jest.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Linter } from 'eslint';
|
|
2
2
|
declare const config: {
|
|
3
|
-
readonly files: ["**/*.{js,jsx,mjs,cjs}", "**/*.{ts,tsx,mts,cts}"];
|
|
3
|
+
readonly files: ["**/*.{spec,test}.{js,jsx,mjs,cjs}", "**/*.{spec,test}.{ts,tsx,mts,cts}"];
|
|
4
4
|
readonly languageOptions: {
|
|
5
5
|
readonly globals: {
|
|
6
6
|
readonly afterAll: false;
|
|
@@ -19,7 +19,30 @@ declare const config: {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
readonly plugins: {
|
|
22
|
-
readonly jest:
|
|
22
|
+
readonly jest: {
|
|
23
|
+
meta: {
|
|
24
|
+
name: string;
|
|
25
|
+
version: string;
|
|
26
|
+
};
|
|
27
|
+
environments: {
|
|
28
|
+
globals: {
|
|
29
|
+
globals: {
|
|
30
|
+
[key: string]: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
configs: {
|
|
35
|
+
all: Linter.LegacyConfig;
|
|
36
|
+
recommended: Linter.LegacyConfig;
|
|
37
|
+
style: Linter.LegacyConfig;
|
|
38
|
+
"flat/all": Linter.FlatConfig;
|
|
39
|
+
"flat/recommended": Linter.FlatConfig;
|
|
40
|
+
"flat/style": Linter.FlatConfig;
|
|
41
|
+
};
|
|
42
|
+
rules: {
|
|
43
|
+
[key: string]: import("eslint").Rule.RuleModule;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
23
46
|
};
|
|
24
47
|
readonly rules: {
|
|
25
48
|
readonly 'jest/consistent-test-it': "error";
|
package/dist/jest.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import globals from 'globals';
|
|
2
|
-
// @ts-expect-error TS7016
|
|
3
2
|
import jest from 'eslint-plugin-jest';
|
|
4
3
|
const config = {
|
|
5
|
-
files: ['**/*.{js,jsx,mjs,cjs}', '**/*.{ts,tsx,mts,cts}'],
|
|
4
|
+
files: ['**/*.{spec,test}.{js,jsx,mjs,cjs}', '**/*.{spec,test}.{ts,tsx,mts,cts}'],
|
|
6
5
|
languageOptions: {
|
|
7
6
|
globals: {
|
|
8
7
|
...globals.jest
|
|
9
8
|
}
|
|
10
9
|
},
|
|
11
|
-
plugins: { jest
|
|
10
|
+
plugins: { jest },
|
|
12
11
|
rules: {
|
|
13
12
|
'jest/consistent-test-it': 'error',
|
|
14
13
|
'jest/expect-expect': 'error',
|
package/dist/typescript.d.ts
CHANGED
|
@@ -123,6 +123,7 @@ declare const config: {
|
|
|
123
123
|
readonly '@typescript-eslint/no-unsafe-function-type': "error";
|
|
124
124
|
readonly '@typescript-eslint/no-unsafe-member-access': "error";
|
|
125
125
|
readonly '@typescript-eslint/no-unsafe-return': "error";
|
|
126
|
+
readonly '@typescript-eslint/no-unsafe-type-assertion': "off";
|
|
126
127
|
readonly '@typescript-eslint/no-unsafe-unary-minus': "error";
|
|
127
128
|
readonly '@typescript-eslint/no-unused-expressions': ["error", {
|
|
128
129
|
readonly enforceForJSX: true;
|
|
@@ -158,6 +159,7 @@ declare const config: {
|
|
|
158
159
|
readonly '@typescript-eslint/prefer-return-this-type': "error";
|
|
159
160
|
readonly '@typescript-eslint/prefer-string-starts-ends-with': "error";
|
|
160
161
|
readonly '@typescript-eslint/promise-function-async': "error";
|
|
162
|
+
readonly '@typescript-eslint/related-getter-setter-pairs': "error";
|
|
161
163
|
readonly '@typescript-eslint/require-array-sort-compare': "error";
|
|
162
164
|
readonly '@typescript-eslint/require-await': "error";
|
|
163
165
|
readonly '@typescript-eslint/restrict-plus-operands': "error";
|
package/dist/typescript.js
CHANGED
|
@@ -126,6 +126,7 @@ const config = {
|
|
|
126
126
|
'@typescript-eslint/no-unsafe-function-type': 'error',
|
|
127
127
|
'@typescript-eslint/no-unsafe-member-access': 'error',
|
|
128
128
|
'@typescript-eslint/no-unsafe-return': 'error',
|
|
129
|
+
'@typescript-eslint/no-unsafe-type-assertion': 'off',
|
|
129
130
|
'@typescript-eslint/no-unsafe-unary-minus': 'error',
|
|
130
131
|
'@typescript-eslint/no-unused-expressions': ['error', { enforceForJSX: true }],
|
|
131
132
|
'@typescript-eslint/no-unused-vars': [
|
|
@@ -162,6 +163,7 @@ const config = {
|
|
|
162
163
|
'@typescript-eslint/prefer-return-this-type': 'error',
|
|
163
164
|
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
|
|
164
165
|
'@typescript-eslint/promise-function-async': 'error',
|
|
166
|
+
'@typescript-eslint/related-getter-setter-pairs': 'error',
|
|
165
167
|
'@typescript-eslint/require-array-sort-compare': 'error',
|
|
166
168
|
'@typescript-eslint/require-await': 'error',
|
|
167
169
|
'@typescript-eslint/restrict-plus-operands': 'error',
|
package/dist/vitest.d.ts
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
declare const config: {
|
|
2
|
+
readonly files: ["**/*.{spec,test}.{js,jsx,mjs,cjs}", "**/*.{spec,test}.{ts,tsx,mts,cts}"];
|
|
3
|
+
readonly plugins: {
|
|
4
|
+
readonly vitest: {
|
|
5
|
+
meta: {
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
};
|
|
9
|
+
rules: {
|
|
10
|
+
"prefer-lowercase-title": import("eslint").Rule.RuleModule;
|
|
11
|
+
"max-nested-describe": import("eslint").Rule.RuleModule;
|
|
12
|
+
"no-identical-title": import("eslint").Rule.RuleModule;
|
|
13
|
+
"no-focused-tests": import("eslint").Rule.RuleModule;
|
|
14
|
+
"no-conditional-tests": import("eslint").Rule.RuleModule;
|
|
15
|
+
"expect-expect": import("eslint").Rule.RuleModule;
|
|
16
|
+
"consistent-test-it": import("eslint").Rule.RuleModule;
|
|
17
|
+
"prefer-to-be": import("eslint").Rule.RuleModule;
|
|
18
|
+
"no-hooks": import("eslint").Rule.RuleModule;
|
|
19
|
+
"no-restricted-vi-methods": import("eslint").Rule.RuleModule;
|
|
20
|
+
"consistent-test-filename": import("eslint").Rule.RuleModule;
|
|
21
|
+
"max-expects": import("eslint").Rule.RuleModule;
|
|
22
|
+
"no-alias-methods": import("eslint").Rule.RuleModule;
|
|
23
|
+
"no-commented-out-tests": import("eslint").Rule.RuleModule;
|
|
24
|
+
"no-conditional-expect": import("eslint").Rule.RuleModule;
|
|
25
|
+
"no-conditional-in-test": import("eslint").Rule.RuleModule;
|
|
26
|
+
"no-disabled-tests": import("eslint").Rule.RuleModule;
|
|
27
|
+
"no-done-callback": import("eslint").Rule.RuleModule;
|
|
28
|
+
"no-duplicate-hooks": import("eslint").Rule.RuleModule;
|
|
29
|
+
"no-large-snapshots": import("eslint").Rule.RuleModule;
|
|
30
|
+
"no-interpolation-in-snapshots": import("eslint").Rule.RuleModule;
|
|
31
|
+
"no-mocks-import": import("eslint").Rule.RuleModule;
|
|
32
|
+
"no-restricted-matchers": import("eslint").Rule.RuleModule;
|
|
33
|
+
"no-standalone-expect": import("eslint").Rule.RuleModule;
|
|
34
|
+
"no-test-prefixes": import("eslint").Rule.RuleModule;
|
|
35
|
+
"no-test-return-statement": import("eslint").Rule.RuleModule;
|
|
36
|
+
"no-import-node-test": import("eslint").Rule.RuleModule;
|
|
37
|
+
"prefer-called-with": import("eslint").Rule.RuleModule;
|
|
38
|
+
"valid-title": import("eslint").Rule.RuleModule;
|
|
39
|
+
"valid-expect": import("eslint").Rule.RuleModule;
|
|
40
|
+
"prefer-to-be-falsy": import("eslint").Rule.RuleModule;
|
|
41
|
+
"prefer-to-be-object": import("eslint").Rule.RuleModule;
|
|
42
|
+
"prefer-to-be-truthy": import("eslint").Rule.RuleModule;
|
|
43
|
+
"prefer-to-have-length": import("eslint").Rule.RuleModule;
|
|
44
|
+
"prefer-equality-matcher": import("eslint").Rule.RuleModule;
|
|
45
|
+
"prefer-strict-equal": import("eslint").Rule.RuleModule;
|
|
46
|
+
"prefer-expect-resolves": import("eslint").Rule.RuleModule;
|
|
47
|
+
"prefer-each": import("eslint").Rule.RuleModule;
|
|
48
|
+
"prefer-hooks-on-top": import("eslint").Rule.RuleModule;
|
|
49
|
+
"prefer-hooks-in-order": import("eslint").Rule.RuleModule;
|
|
50
|
+
"require-local-test-context-for-concurrent-snapshots": import("eslint").Rule.RuleModule;
|
|
51
|
+
"prefer-mock-promise-shorthand": import("eslint").Rule.RuleModule;
|
|
52
|
+
"prefer-vi-mocked": import("eslint").Rule.RuleModule;
|
|
53
|
+
"prefer-snapshot-hint": import("eslint").Rule.RuleModule;
|
|
54
|
+
"valid-describe-callback": import("eslint").Rule.RuleModule;
|
|
55
|
+
"require-top-level-describe": import("eslint").Rule.RuleModule;
|
|
56
|
+
"require-to-throw-message": import("eslint").Rule.RuleModule;
|
|
57
|
+
"require-hook": import("eslint").Rule.RuleModule;
|
|
58
|
+
"prefer-todo": import("eslint").Rule.RuleModule;
|
|
59
|
+
"prefer-spy-on": import("eslint").Rule.RuleModule;
|
|
60
|
+
"prefer-comparison-matcher": import("eslint").Rule.RuleModule;
|
|
61
|
+
"prefer-to-contain": import("eslint").Rule.RuleModule;
|
|
62
|
+
"prefer-expect-assertions": import("eslint").Rule.RuleModule;
|
|
63
|
+
"padding-around-after-all-blocks": import("eslint").Rule.RuleModule;
|
|
64
|
+
"padding-around-after-each-blocks": import("eslint").Rule.RuleModule;
|
|
65
|
+
"padding-around-all": import("eslint").Rule.RuleModule;
|
|
66
|
+
"padding-around-before-all-blocks": import("eslint").Rule.RuleModule;
|
|
67
|
+
"padding-around-before-each-blocks": import("eslint").Rule.RuleModule;
|
|
68
|
+
"padding-around-describe-blocks": import("eslint").Rule.RuleModule;
|
|
69
|
+
"padding-around-expect-groups": import("eslint").Rule.RuleModule;
|
|
70
|
+
"padding-around-test-blocks": import("eslint").Rule.RuleModule;
|
|
71
|
+
"valid-expect-in-promise": import("eslint").Rule.RuleModule;
|
|
72
|
+
};
|
|
73
|
+
configs: {
|
|
74
|
+
"legacy-recommended": {
|
|
75
|
+
plugins: string[];
|
|
76
|
+
rules: {};
|
|
77
|
+
};
|
|
78
|
+
"legacy-all": {
|
|
79
|
+
plugins: string[];
|
|
80
|
+
rules: {};
|
|
81
|
+
};
|
|
82
|
+
recommended: {
|
|
83
|
+
plugins: {
|
|
84
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
85
|
+
};
|
|
86
|
+
rules: {
|
|
87
|
+
readonly "vitest/expect-expect": "error";
|
|
88
|
+
readonly "vitest/no-identical-title": "error";
|
|
89
|
+
readonly "vitest/no-commented-out-tests": "error";
|
|
90
|
+
readonly "vitest/valid-title": "error";
|
|
91
|
+
readonly "vitest/valid-expect": "error";
|
|
92
|
+
readonly "vitest/valid-describe-callback": "error";
|
|
93
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
94
|
+
readonly "vitest/no-import-node-test": "error";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
all: {
|
|
98
|
+
plugins: {
|
|
99
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
100
|
+
};
|
|
101
|
+
rules: {
|
|
102
|
+
readonly "vitest/prefer-lowercase-title": "warn";
|
|
103
|
+
readonly "vitest/max-nested-describe": "warn";
|
|
104
|
+
readonly "vitest/no-focused-tests": "warn";
|
|
105
|
+
readonly "vitest/no-conditional-tests": "warn";
|
|
106
|
+
readonly "vitest/consistent-test-it": "warn";
|
|
107
|
+
readonly "vitest/no-hooks": "warn";
|
|
108
|
+
readonly "vitest/no-restricted-vi-methods": "warn";
|
|
109
|
+
readonly "vitest/consistent-test-filename": "warn";
|
|
110
|
+
readonly "vitest/max-expects": "warn";
|
|
111
|
+
readonly "vitest/no-alias-methods": "warn";
|
|
112
|
+
readonly "vitest/no-conditional-expect": "warn";
|
|
113
|
+
readonly "vitest/no-conditional-in-test": "warn";
|
|
114
|
+
readonly "vitest/no-disabled-tests": "warn";
|
|
115
|
+
readonly "vitest/no-done-callback": "warn";
|
|
116
|
+
readonly "vitest/no-duplicate-hooks": "warn";
|
|
117
|
+
readonly "vitest/no-large-snapshots": "warn";
|
|
118
|
+
readonly "vitest/no-interpolation-in-snapshots": "warn";
|
|
119
|
+
readonly "vitest/no-mocks-import": "warn";
|
|
120
|
+
readonly "vitest/no-restricted-matchers": "warn";
|
|
121
|
+
readonly "vitest/no-standalone-expect": "warn";
|
|
122
|
+
readonly "vitest/no-test-prefixes": "warn";
|
|
123
|
+
readonly "vitest/no-test-return-statement": "warn";
|
|
124
|
+
readonly "vitest/prefer-called-with": "warn";
|
|
125
|
+
readonly "vitest/prefer-to-be-falsy": "warn";
|
|
126
|
+
readonly "vitest/prefer-to-be-object": "warn";
|
|
127
|
+
readonly "vitest/prefer-to-be-truthy": "warn";
|
|
128
|
+
readonly "vitest/prefer-to-have-length": "warn";
|
|
129
|
+
readonly "vitest/prefer-equality-matcher": "warn";
|
|
130
|
+
readonly "vitest/prefer-strict-equal": "warn";
|
|
131
|
+
readonly "vitest/prefer-expect-resolves": "warn";
|
|
132
|
+
readonly "vitest/prefer-each": "warn";
|
|
133
|
+
readonly "vitest/prefer-hooks-on-top": "warn";
|
|
134
|
+
readonly "vitest/prefer-hooks-in-order": "warn";
|
|
135
|
+
readonly "vitest/prefer-mock-promise-shorthand": "warn";
|
|
136
|
+
readonly "vitest/prefer-vi-mocked": "warn";
|
|
137
|
+
readonly "vitest/prefer-snapshot-hint": "warn";
|
|
138
|
+
readonly "vitest/require-top-level-describe": "warn";
|
|
139
|
+
readonly "vitest/require-to-throw-message": "warn";
|
|
140
|
+
readonly "vitest/require-hook": "warn";
|
|
141
|
+
readonly "vitest/prefer-todo": "warn";
|
|
142
|
+
readonly "vitest/prefer-spy-on": "warn";
|
|
143
|
+
readonly "vitest/prefer-comparison-matcher": "warn";
|
|
144
|
+
readonly "vitest/prefer-to-contain": "warn";
|
|
145
|
+
readonly "vitest/prefer-expect-assertions": "warn";
|
|
146
|
+
readonly "vitest/prefer-to-be": "warn";
|
|
147
|
+
readonly "vitest/padding-around-after-all-blocks": "warn";
|
|
148
|
+
readonly "vitest/padding-around-after-each-blocks": "warn";
|
|
149
|
+
readonly "vitest/padding-around-all": "warn";
|
|
150
|
+
readonly "vitest/padding-around-before-all-blocks": "warn";
|
|
151
|
+
readonly "vitest/padding-around-before-each-blocks": "warn";
|
|
152
|
+
readonly "vitest/padding-around-describe-blocks": "warn";
|
|
153
|
+
readonly "vitest/padding-around-expect-groups": "warn";
|
|
154
|
+
readonly "vitest/padding-around-test-blocks": "warn";
|
|
155
|
+
readonly "vitest/valid-expect-in-promise": "warn";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
env: {
|
|
159
|
+
languageOptions: {
|
|
160
|
+
globals: {
|
|
161
|
+
suite: "writable";
|
|
162
|
+
test: "writable";
|
|
163
|
+
describe: "writable";
|
|
164
|
+
it: "writable";
|
|
165
|
+
expect: "writable";
|
|
166
|
+
assert: "writable";
|
|
167
|
+
vitest: "writable";
|
|
168
|
+
vi: "writable";
|
|
169
|
+
beforeAll: "writable";
|
|
170
|
+
afterAll: "writable";
|
|
171
|
+
beforeEach: "writable";
|
|
172
|
+
afterEach: "writable";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
environments: {
|
|
178
|
+
env: {
|
|
179
|
+
globals: {
|
|
180
|
+
suite: true;
|
|
181
|
+
test: true;
|
|
182
|
+
describe: true;
|
|
183
|
+
it: true;
|
|
184
|
+
expect: true;
|
|
185
|
+
assert: true;
|
|
186
|
+
vitest: true;
|
|
187
|
+
vi: true;
|
|
188
|
+
beforeAll: true;
|
|
189
|
+
afterAll: true;
|
|
190
|
+
beforeEach: true;
|
|
191
|
+
afterEach: true;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
readonly rules: {
|
|
198
|
+
readonly 'max-lines-per-function': "off";
|
|
199
|
+
readonly 'max-statements': "off";
|
|
200
|
+
readonly 'n/no-unpublished-import': ["error", {
|
|
201
|
+
readonly allowModules: readonly ["vitest"];
|
|
202
|
+
}];
|
|
203
|
+
readonly 'vitest/consistent-test-filename': "error";
|
|
204
|
+
readonly 'vitest/consistent-test-it': "error";
|
|
205
|
+
readonly 'vitest/expect-expect': "error";
|
|
206
|
+
readonly 'vitest/max-expects': "error";
|
|
207
|
+
readonly 'vitest/max-nested-describe': "error";
|
|
208
|
+
readonly 'vitest/no-alias-methods': "error";
|
|
209
|
+
readonly 'vitest/no-commented-out-tests': "error";
|
|
210
|
+
readonly 'vitest/no-conditional-expect': "error";
|
|
211
|
+
readonly 'vitest/no-conditional-in-test': "error";
|
|
212
|
+
readonly 'vitest/no-conditional-tests': "error";
|
|
213
|
+
readonly 'vitest/no-disabled-tests': "error";
|
|
214
|
+
readonly 'vitest/no-duplicate-hooks': "error";
|
|
215
|
+
readonly 'vitest/no-focused-tests': "error";
|
|
216
|
+
readonly 'vitest/no-hooks': "off";
|
|
217
|
+
readonly 'vitest/no-identical-title': "error";
|
|
218
|
+
readonly 'vitest/no-import-node-test': "error";
|
|
219
|
+
readonly 'vitest/no-interpolation-in-snapshots': "error";
|
|
220
|
+
readonly 'vitest/no-large-snapshots': "error";
|
|
221
|
+
readonly 'vitest/no-mocks-import': "error";
|
|
222
|
+
readonly 'vitest/no-restricted-matchers': "error";
|
|
223
|
+
readonly 'vitest/no-restricted-vi-methods': "error";
|
|
224
|
+
readonly 'vitest/no-standalone-expect': "error";
|
|
225
|
+
readonly 'vitest/no-test-prefixes': "error";
|
|
226
|
+
readonly 'vitest/no-test-return-statement': "error";
|
|
227
|
+
readonly 'vitest/padding-around-after-all-blocks': "error";
|
|
228
|
+
readonly 'vitest/padding-around-after-each-blocks': "error";
|
|
229
|
+
readonly 'vitest/padding-around-all': "error";
|
|
230
|
+
readonly 'vitest/padding-around-before-all-blocks': "error";
|
|
231
|
+
readonly 'vitest/padding-around-before-each-blocks': "error";
|
|
232
|
+
readonly 'vitest/padding-around-describe-blocks': "error";
|
|
233
|
+
readonly 'vitest/padding-around-expect-groups': "error";
|
|
234
|
+
readonly 'vitest/padding-around-test-blocks': "error";
|
|
235
|
+
readonly 'vitest/prefer-called-with': "error";
|
|
236
|
+
readonly 'vitest/prefer-comparison-matcher': "error";
|
|
237
|
+
readonly 'vitest/prefer-each': "error";
|
|
238
|
+
readonly 'vitest/prefer-equality-matcher': "error";
|
|
239
|
+
readonly 'vitest/prefer-expect-assertions': ["error", {
|
|
240
|
+
readonly onlyFunctionsWithAsyncKeyword: true;
|
|
241
|
+
}];
|
|
242
|
+
readonly 'vitest/prefer-expect-resolves': "error";
|
|
243
|
+
readonly 'vitest/prefer-hooks-in-order': "error";
|
|
244
|
+
readonly 'vitest/prefer-hooks-on-top': "error";
|
|
245
|
+
readonly 'vitest/prefer-lowercase-title': "error";
|
|
246
|
+
readonly 'vitest/prefer-mock-promise-shorthand': "error";
|
|
247
|
+
readonly 'vitest/prefer-snapshot-hint': "error";
|
|
248
|
+
readonly 'vitest/prefer-spy-on': "error";
|
|
249
|
+
readonly 'vitest/prefer-strict-equal': "error";
|
|
250
|
+
readonly 'vitest/prefer-to-be': "error";
|
|
251
|
+
readonly 'vitest/prefer-to-be-falsy': "off";
|
|
252
|
+
readonly 'vitest/prefer-to-be-object': "error";
|
|
253
|
+
readonly 'vitest/prefer-to-be-truthy': "off";
|
|
254
|
+
readonly 'vitest/prefer-to-contain': "error";
|
|
255
|
+
readonly 'vitest/prefer-to-have-length': "error";
|
|
256
|
+
readonly 'vitest/prefer-todo': "error";
|
|
257
|
+
readonly 'vitest/prefer-vi-mocked': "error";
|
|
258
|
+
readonly 'vitest/require-hook': "error";
|
|
259
|
+
readonly 'vitest/require-local-test-context-for-concurrent-snapshots': "error";
|
|
260
|
+
readonly 'vitest/require-to-throw-message': "error";
|
|
261
|
+
readonly 'vitest/require-top-level-describe': "error";
|
|
262
|
+
readonly 'vitest/valid-describe-callback': "error";
|
|
263
|
+
readonly 'vitest/valid-expect': "error";
|
|
264
|
+
readonly 'vitest/valid-expect-in-promise': "error";
|
|
265
|
+
readonly 'vitest/valid-title': "error";
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
export { config as vitest };
|
|
269
|
+
export default config;
|
package/dist/vitest.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import vitest from '@vitest/eslint-plugin';
|
|
2
|
+
const config = {
|
|
3
|
+
files: ['**/*.{spec,test}.{js,jsx,mjs,cjs}', '**/*.{spec,test}.{ts,tsx,mts,cts}'],
|
|
4
|
+
plugins: { vitest },
|
|
5
|
+
rules: {
|
|
6
|
+
'max-lines-per-function': 'off',
|
|
7
|
+
'max-statements': 'off',
|
|
8
|
+
'n/no-unpublished-import': [
|
|
9
|
+
'error',
|
|
10
|
+
{
|
|
11
|
+
allowModules: ['vitest']
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
'vitest/consistent-test-filename': 'error',
|
|
15
|
+
'vitest/consistent-test-it': 'error',
|
|
16
|
+
'vitest/expect-expect': 'error',
|
|
17
|
+
'vitest/max-expects': 'error',
|
|
18
|
+
'vitest/max-nested-describe': 'error',
|
|
19
|
+
'vitest/no-alias-methods': 'error',
|
|
20
|
+
'vitest/no-commented-out-tests': 'error',
|
|
21
|
+
'vitest/no-conditional-expect': 'error',
|
|
22
|
+
'vitest/no-conditional-in-test': 'error',
|
|
23
|
+
'vitest/no-conditional-tests': 'error',
|
|
24
|
+
'vitest/no-disabled-tests': 'error',
|
|
25
|
+
'vitest/no-duplicate-hooks': 'error',
|
|
26
|
+
'vitest/no-focused-tests': 'error',
|
|
27
|
+
'vitest/no-hooks': 'off',
|
|
28
|
+
'vitest/no-identical-title': 'error',
|
|
29
|
+
'vitest/no-import-node-test': 'error',
|
|
30
|
+
'vitest/no-interpolation-in-snapshots': 'error',
|
|
31
|
+
'vitest/no-large-snapshots': 'error',
|
|
32
|
+
'vitest/no-mocks-import': 'error',
|
|
33
|
+
'vitest/no-restricted-matchers': 'error',
|
|
34
|
+
'vitest/no-restricted-vi-methods': 'error',
|
|
35
|
+
'vitest/no-standalone-expect': 'error',
|
|
36
|
+
'vitest/no-test-prefixes': 'error',
|
|
37
|
+
'vitest/no-test-return-statement': 'error',
|
|
38
|
+
'vitest/padding-around-after-all-blocks': 'error',
|
|
39
|
+
'vitest/padding-around-after-each-blocks': 'error',
|
|
40
|
+
'vitest/padding-around-all': 'error',
|
|
41
|
+
'vitest/padding-around-before-all-blocks': 'error',
|
|
42
|
+
'vitest/padding-around-before-each-blocks': 'error',
|
|
43
|
+
'vitest/padding-around-describe-blocks': 'error',
|
|
44
|
+
'vitest/padding-around-expect-groups': 'error',
|
|
45
|
+
'vitest/padding-around-test-blocks': 'error',
|
|
46
|
+
'vitest/prefer-called-with': 'error',
|
|
47
|
+
'vitest/prefer-comparison-matcher': 'error',
|
|
48
|
+
'vitest/prefer-each': 'error',
|
|
49
|
+
'vitest/prefer-equality-matcher': 'error',
|
|
50
|
+
'vitest/prefer-expect-assertions': ['error', { onlyFunctionsWithAsyncKeyword: true }],
|
|
51
|
+
'vitest/prefer-expect-resolves': 'error',
|
|
52
|
+
'vitest/prefer-hooks-in-order': 'error',
|
|
53
|
+
'vitest/prefer-hooks-on-top': 'error',
|
|
54
|
+
'vitest/prefer-lowercase-title': 'error',
|
|
55
|
+
'vitest/prefer-mock-promise-shorthand': 'error',
|
|
56
|
+
'vitest/prefer-snapshot-hint': 'error',
|
|
57
|
+
'vitest/prefer-spy-on': 'error',
|
|
58
|
+
'vitest/prefer-strict-equal': 'error',
|
|
59
|
+
'vitest/prefer-to-be': 'error',
|
|
60
|
+
'vitest/prefer-to-be-falsy': 'off',
|
|
61
|
+
'vitest/prefer-to-be-object': 'error',
|
|
62
|
+
'vitest/prefer-to-be-truthy': 'off',
|
|
63
|
+
'vitest/prefer-to-contain': 'error',
|
|
64
|
+
'vitest/prefer-to-have-length': 'error',
|
|
65
|
+
'vitest/prefer-todo': 'error',
|
|
66
|
+
'vitest/prefer-vi-mocked': 'error',
|
|
67
|
+
'vitest/require-hook': 'error',
|
|
68
|
+
'vitest/require-local-test-context-for-concurrent-snapshots': 'error',
|
|
69
|
+
'vitest/require-to-throw-message': 'error',
|
|
70
|
+
'vitest/require-top-level-describe': 'error',
|
|
71
|
+
'vitest/valid-describe-callback': 'error',
|
|
72
|
+
'vitest/valid-expect': 'error',
|
|
73
|
+
'vitest/valid-expect-in-promise': 'error',
|
|
74
|
+
'vitest/valid-title': 'error'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export { config as vitest };
|
|
78
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.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": "~2.
|
|
10
|
+
"@stylistic/eslint-plugin": "~2.11.0",
|
|
11
11
|
"eslint-plugin-import": "~2.31.0",
|
|
12
|
-
"eslint-plugin-jsdoc": "~50.
|
|
13
|
-
"eslint-plugin-n": "~17.
|
|
14
|
-
"globals": "^15.
|
|
12
|
+
"eslint-plugin-jsdoc": "~50.5.0",
|
|
13
|
+
"eslint-plugin-n": "~17.13.2",
|
|
14
|
+
"globals": "^15.12.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@eslint-stylistic/metadata": "~2.
|
|
18
|
-
"@eslint/js": "~9.
|
|
19
|
-
"@types/
|
|
20
|
-
"@
|
|
21
|
-
"
|
|
22
|
-
"eslint": "~9.13.0",
|
|
17
|
+
"@eslint-stylistic/metadata": "~2.11.0",
|
|
18
|
+
"@eslint/js": "~9.15.0",
|
|
19
|
+
"@types/node": "^22.9.0",
|
|
20
|
+
"@vitest/eslint-plugin": "~1.1.10",
|
|
21
|
+
"eslint": "~9.15.0",
|
|
23
22
|
"eslint-import-resolver-typescript": "~3.6.3",
|
|
24
|
-
"eslint-plugin-jest": "~28.
|
|
23
|
+
"eslint-plugin-jest": "~28.9.0",
|
|
25
24
|
"eslint-plugin-react": "~7.37.2",
|
|
26
25
|
"eslint-plugin-react-hooks": "~5.0.0",
|
|
27
26
|
"husky": "^9.1.6",
|
|
28
|
-
"jiti": "^2.
|
|
27
|
+
"jiti": "^2.4.0",
|
|
29
28
|
"typescript": "~5.6.3",
|
|
30
|
-
"typescript-eslint": "~8.
|
|
29
|
+
"typescript-eslint": "~8.15.0"
|
|
31
30
|
},
|
|
32
31
|
"engines": {
|
|
33
32
|
"node": ">=18.18.0"
|
|
@@ -48,6 +47,10 @@
|
|
|
48
47
|
"./typescript": {
|
|
49
48
|
"types": "./dist/typescript.d.ts",
|
|
50
49
|
"default": "./dist/typescript.js"
|
|
50
|
+
},
|
|
51
|
+
"./vitest": {
|
|
52
|
+
"types": "./dist/vitest.d.ts",
|
|
53
|
+
"default": "./dist/vitest.js"
|
|
51
54
|
}
|
|
52
55
|
},
|
|
53
56
|
"files": [
|
|
@@ -61,15 +64,19 @@
|
|
|
61
64
|
"license": "MIT",
|
|
62
65
|
"main": "./dist/index.js",
|
|
63
66
|
"peerDependencies": {
|
|
67
|
+
"@vitest/eslint-plugin": "^1.1.10",
|
|
64
68
|
"eslint": "^9.11.1",
|
|
65
69
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
66
70
|
"eslint-plugin-jest": "^28.8.3",
|
|
67
71
|
"eslint-plugin-react": "^7.36.1",
|
|
68
72
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
69
73
|
"typescript": "^5.0.4",
|
|
70
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"typescript-eslint": "^8.15.0"
|
|
71
75
|
},
|
|
72
76
|
"peerDependenciesMeta": {
|
|
77
|
+
"@vitest/eslint-plugin": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
73
80
|
"@eslint/compat": {
|
|
74
81
|
"optional": true
|
|
75
82
|
},
|