@vitest/eslint-plugin 1.1.20 → 1.1.21
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/LICENSE +1 -1
- package/dist/index.cjs +121 -173
- package/dist/index.d.cts +7 -206
- package/dist/index.d.mts +7 -206
- package/dist/index.d.ts +7 -206
- package/dist/index.mjs +120 -172
- package/package.json +14 -15
package/dist/index.d.cts
CHANGED
|
@@ -1,213 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ESLint } from 'eslint';
|
|
1
|
+
import { Linter, RuleModule } from '@typescript-eslint/utils/ts-eslint';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
interface VitestPLugin extends Linter.Plugin {
|
|
5
4
|
meta: {
|
|
6
5
|
name: string;
|
|
7
6
|
version: string;
|
|
8
7
|
};
|
|
9
|
-
rules:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"no-conditional-tests": eslint.Rule.RuleModule;
|
|
15
|
-
"expect-expect": eslint.Rule.RuleModule;
|
|
16
|
-
"consistent-test-it": eslint.Rule.RuleModule;
|
|
17
|
-
"prefer-to-be": eslint.Rule.RuleModule;
|
|
18
|
-
"no-hooks": eslint.Rule.RuleModule;
|
|
19
|
-
"no-restricted-vi-methods": eslint.Rule.RuleModule;
|
|
20
|
-
"consistent-test-filename": eslint.Rule.RuleModule;
|
|
21
|
-
"max-expects": eslint.Rule.RuleModule;
|
|
22
|
-
"no-alias-methods": eslint.Rule.RuleModule;
|
|
23
|
-
"no-commented-out-tests": eslint.Rule.RuleModule;
|
|
24
|
-
"no-conditional-expect": eslint.Rule.RuleModule;
|
|
25
|
-
"no-conditional-in-test": eslint.Rule.RuleModule;
|
|
26
|
-
"no-disabled-tests": eslint.Rule.RuleModule;
|
|
27
|
-
"no-done-callback": eslint.Rule.RuleModule;
|
|
28
|
-
"no-duplicate-hooks": eslint.Rule.RuleModule;
|
|
29
|
-
"no-large-snapshots": eslint.Rule.RuleModule;
|
|
30
|
-
"no-interpolation-in-snapshots": eslint.Rule.RuleModule;
|
|
31
|
-
"no-mocks-import": eslint.Rule.RuleModule;
|
|
32
|
-
"no-restricted-matchers": eslint.Rule.RuleModule;
|
|
33
|
-
"no-standalone-expect": eslint.Rule.RuleModule;
|
|
34
|
-
"no-test-prefixes": eslint.Rule.RuleModule;
|
|
35
|
-
"no-test-return-statement": eslint.Rule.RuleModule;
|
|
36
|
-
"no-import-node-test": eslint.Rule.RuleModule;
|
|
37
|
-
"prefer-called-with": eslint.Rule.RuleModule;
|
|
38
|
-
"valid-title": eslint.Rule.RuleModule;
|
|
39
|
-
"valid-expect": eslint.Rule.RuleModule;
|
|
40
|
-
"prefer-to-be-falsy": eslint.Rule.RuleModule;
|
|
41
|
-
"prefer-to-be-object": eslint.Rule.RuleModule;
|
|
42
|
-
"prefer-to-be-truthy": eslint.Rule.RuleModule;
|
|
43
|
-
"prefer-to-have-length": eslint.Rule.RuleModule;
|
|
44
|
-
"prefer-equality-matcher": eslint.Rule.RuleModule;
|
|
45
|
-
"prefer-strict-equal": eslint.Rule.RuleModule;
|
|
46
|
-
"prefer-expect-resolves": eslint.Rule.RuleModule;
|
|
47
|
-
"prefer-each": eslint.Rule.RuleModule;
|
|
48
|
-
"prefer-hooks-on-top": eslint.Rule.RuleModule;
|
|
49
|
-
"prefer-hooks-in-order": eslint.Rule.RuleModule;
|
|
50
|
-
"require-local-test-context-for-concurrent-snapshots": eslint.Rule.RuleModule;
|
|
51
|
-
"prefer-mock-promise-shorthand": eslint.Rule.RuleModule;
|
|
52
|
-
"prefer-vi-mocked": eslint.Rule.RuleModule;
|
|
53
|
-
"prefer-snapshot-hint": eslint.Rule.RuleModule;
|
|
54
|
-
"valid-describe-callback": eslint.Rule.RuleModule;
|
|
55
|
-
"require-top-level-describe": eslint.Rule.RuleModule;
|
|
56
|
-
"require-to-throw-message": eslint.Rule.RuleModule;
|
|
57
|
-
"require-hook": eslint.Rule.RuleModule;
|
|
58
|
-
"prefer-todo": eslint.Rule.RuleModule;
|
|
59
|
-
"prefer-spy-on": eslint.Rule.RuleModule;
|
|
60
|
-
"prefer-comparison-matcher": eslint.Rule.RuleModule;
|
|
61
|
-
"prefer-to-contain": eslint.Rule.RuleModule;
|
|
62
|
-
"prefer-expect-assertions": eslint.Rule.RuleModule;
|
|
63
|
-
"padding-around-after-all-blocks": eslint.Rule.RuleModule;
|
|
64
|
-
"padding-around-after-each-blocks": eslint.Rule.RuleModule;
|
|
65
|
-
"padding-around-all": eslint.Rule.RuleModule;
|
|
66
|
-
"padding-around-before-all-blocks": eslint.Rule.RuleModule;
|
|
67
|
-
"padding-around-before-each-blocks": eslint.Rule.RuleModule;
|
|
68
|
-
"padding-around-describe-blocks": eslint.Rule.RuleModule;
|
|
69
|
-
"padding-around-expect-groups": eslint.Rule.RuleModule;
|
|
70
|
-
"padding-around-test-blocks": eslint.Rule.RuleModule;
|
|
71
|
-
"valid-expect-in-promise": 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: 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: 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
|
-
readonly "vitest/expect-expect": "warn";
|
|
157
|
-
readonly "vitest/no-identical-title": "warn";
|
|
158
|
-
readonly "vitest/no-commented-out-tests": "warn";
|
|
159
|
-
readonly "vitest/valid-title": "warn";
|
|
160
|
-
readonly "vitest/valid-expect": "warn";
|
|
161
|
-
readonly "vitest/valid-describe-callback": "warn";
|
|
162
|
-
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "warn";
|
|
163
|
-
readonly "vitest/no-import-node-test": "warn";
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
env: {
|
|
167
|
-
languageOptions: {
|
|
168
|
-
globals: {
|
|
169
|
-
suite: "writable";
|
|
170
|
-
test: "writable";
|
|
171
|
-
describe: "writable";
|
|
172
|
-
it: "writable";
|
|
173
|
-
expectTypeOf: "writable";
|
|
174
|
-
assertType: "writable";
|
|
175
|
-
expect: "writable";
|
|
176
|
-
assert: "writable";
|
|
177
|
-
vitest: "writable";
|
|
178
|
-
vi: "writable";
|
|
179
|
-
beforeAll: "writable";
|
|
180
|
-
afterAll: "writable";
|
|
181
|
-
beforeEach: "writable";
|
|
182
|
-
afterEach: "writable";
|
|
183
|
-
onTestFailed: "writable";
|
|
184
|
-
onTestFinished: "writable";
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
environments: {
|
|
190
|
-
env: {
|
|
191
|
-
globals: {
|
|
192
|
-
suite: true;
|
|
193
|
-
test: true;
|
|
194
|
-
describe: true;
|
|
195
|
-
it: true;
|
|
196
|
-
expectTypeOf: true;
|
|
197
|
-
assertType: true;
|
|
198
|
-
expect: true;
|
|
199
|
-
assert: true;
|
|
200
|
-
vitest: true;
|
|
201
|
-
vi: true;
|
|
202
|
-
beforeAll: true;
|
|
203
|
-
afterAll: true;
|
|
204
|
-
beforeEach: true;
|
|
205
|
-
afterEach: true;
|
|
206
|
-
onTestFailed: true;
|
|
207
|
-
onTestFinished: true;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
};
|
|
8
|
+
rules: Record<string, RuleModule<any, any>>;
|
|
9
|
+
configs?: Record<string, any>;
|
|
10
|
+
environments?: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
declare const plugin: VitestPLugin;
|
|
212
13
|
|
|
213
14
|
export { plugin as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,213 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ESLint } from 'eslint';
|
|
1
|
+
import { Linter, RuleModule } from '@typescript-eslint/utils/ts-eslint';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
interface VitestPLugin extends Linter.Plugin {
|
|
5
4
|
meta: {
|
|
6
5
|
name: string;
|
|
7
6
|
version: string;
|
|
8
7
|
};
|
|
9
|
-
rules:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"no-conditional-tests": eslint.Rule.RuleModule;
|
|
15
|
-
"expect-expect": eslint.Rule.RuleModule;
|
|
16
|
-
"consistent-test-it": eslint.Rule.RuleModule;
|
|
17
|
-
"prefer-to-be": eslint.Rule.RuleModule;
|
|
18
|
-
"no-hooks": eslint.Rule.RuleModule;
|
|
19
|
-
"no-restricted-vi-methods": eslint.Rule.RuleModule;
|
|
20
|
-
"consistent-test-filename": eslint.Rule.RuleModule;
|
|
21
|
-
"max-expects": eslint.Rule.RuleModule;
|
|
22
|
-
"no-alias-methods": eslint.Rule.RuleModule;
|
|
23
|
-
"no-commented-out-tests": eslint.Rule.RuleModule;
|
|
24
|
-
"no-conditional-expect": eslint.Rule.RuleModule;
|
|
25
|
-
"no-conditional-in-test": eslint.Rule.RuleModule;
|
|
26
|
-
"no-disabled-tests": eslint.Rule.RuleModule;
|
|
27
|
-
"no-done-callback": eslint.Rule.RuleModule;
|
|
28
|
-
"no-duplicate-hooks": eslint.Rule.RuleModule;
|
|
29
|
-
"no-large-snapshots": eslint.Rule.RuleModule;
|
|
30
|
-
"no-interpolation-in-snapshots": eslint.Rule.RuleModule;
|
|
31
|
-
"no-mocks-import": eslint.Rule.RuleModule;
|
|
32
|
-
"no-restricted-matchers": eslint.Rule.RuleModule;
|
|
33
|
-
"no-standalone-expect": eslint.Rule.RuleModule;
|
|
34
|
-
"no-test-prefixes": eslint.Rule.RuleModule;
|
|
35
|
-
"no-test-return-statement": eslint.Rule.RuleModule;
|
|
36
|
-
"no-import-node-test": eslint.Rule.RuleModule;
|
|
37
|
-
"prefer-called-with": eslint.Rule.RuleModule;
|
|
38
|
-
"valid-title": eslint.Rule.RuleModule;
|
|
39
|
-
"valid-expect": eslint.Rule.RuleModule;
|
|
40
|
-
"prefer-to-be-falsy": eslint.Rule.RuleModule;
|
|
41
|
-
"prefer-to-be-object": eslint.Rule.RuleModule;
|
|
42
|
-
"prefer-to-be-truthy": eslint.Rule.RuleModule;
|
|
43
|
-
"prefer-to-have-length": eslint.Rule.RuleModule;
|
|
44
|
-
"prefer-equality-matcher": eslint.Rule.RuleModule;
|
|
45
|
-
"prefer-strict-equal": eslint.Rule.RuleModule;
|
|
46
|
-
"prefer-expect-resolves": eslint.Rule.RuleModule;
|
|
47
|
-
"prefer-each": eslint.Rule.RuleModule;
|
|
48
|
-
"prefer-hooks-on-top": eslint.Rule.RuleModule;
|
|
49
|
-
"prefer-hooks-in-order": eslint.Rule.RuleModule;
|
|
50
|
-
"require-local-test-context-for-concurrent-snapshots": eslint.Rule.RuleModule;
|
|
51
|
-
"prefer-mock-promise-shorthand": eslint.Rule.RuleModule;
|
|
52
|
-
"prefer-vi-mocked": eslint.Rule.RuleModule;
|
|
53
|
-
"prefer-snapshot-hint": eslint.Rule.RuleModule;
|
|
54
|
-
"valid-describe-callback": eslint.Rule.RuleModule;
|
|
55
|
-
"require-top-level-describe": eslint.Rule.RuleModule;
|
|
56
|
-
"require-to-throw-message": eslint.Rule.RuleModule;
|
|
57
|
-
"require-hook": eslint.Rule.RuleModule;
|
|
58
|
-
"prefer-todo": eslint.Rule.RuleModule;
|
|
59
|
-
"prefer-spy-on": eslint.Rule.RuleModule;
|
|
60
|
-
"prefer-comparison-matcher": eslint.Rule.RuleModule;
|
|
61
|
-
"prefer-to-contain": eslint.Rule.RuleModule;
|
|
62
|
-
"prefer-expect-assertions": eslint.Rule.RuleModule;
|
|
63
|
-
"padding-around-after-all-blocks": eslint.Rule.RuleModule;
|
|
64
|
-
"padding-around-after-each-blocks": eslint.Rule.RuleModule;
|
|
65
|
-
"padding-around-all": eslint.Rule.RuleModule;
|
|
66
|
-
"padding-around-before-all-blocks": eslint.Rule.RuleModule;
|
|
67
|
-
"padding-around-before-each-blocks": eslint.Rule.RuleModule;
|
|
68
|
-
"padding-around-describe-blocks": eslint.Rule.RuleModule;
|
|
69
|
-
"padding-around-expect-groups": eslint.Rule.RuleModule;
|
|
70
|
-
"padding-around-test-blocks": eslint.Rule.RuleModule;
|
|
71
|
-
"valid-expect-in-promise": 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: 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: 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
|
-
readonly "vitest/expect-expect": "warn";
|
|
157
|
-
readonly "vitest/no-identical-title": "warn";
|
|
158
|
-
readonly "vitest/no-commented-out-tests": "warn";
|
|
159
|
-
readonly "vitest/valid-title": "warn";
|
|
160
|
-
readonly "vitest/valid-expect": "warn";
|
|
161
|
-
readonly "vitest/valid-describe-callback": "warn";
|
|
162
|
-
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "warn";
|
|
163
|
-
readonly "vitest/no-import-node-test": "warn";
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
env: {
|
|
167
|
-
languageOptions: {
|
|
168
|
-
globals: {
|
|
169
|
-
suite: "writable";
|
|
170
|
-
test: "writable";
|
|
171
|
-
describe: "writable";
|
|
172
|
-
it: "writable";
|
|
173
|
-
expectTypeOf: "writable";
|
|
174
|
-
assertType: "writable";
|
|
175
|
-
expect: "writable";
|
|
176
|
-
assert: "writable";
|
|
177
|
-
vitest: "writable";
|
|
178
|
-
vi: "writable";
|
|
179
|
-
beforeAll: "writable";
|
|
180
|
-
afterAll: "writable";
|
|
181
|
-
beforeEach: "writable";
|
|
182
|
-
afterEach: "writable";
|
|
183
|
-
onTestFailed: "writable";
|
|
184
|
-
onTestFinished: "writable";
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
environments: {
|
|
190
|
-
env: {
|
|
191
|
-
globals: {
|
|
192
|
-
suite: true;
|
|
193
|
-
test: true;
|
|
194
|
-
describe: true;
|
|
195
|
-
it: true;
|
|
196
|
-
expectTypeOf: true;
|
|
197
|
-
assertType: true;
|
|
198
|
-
expect: true;
|
|
199
|
-
assert: true;
|
|
200
|
-
vitest: true;
|
|
201
|
-
vi: true;
|
|
202
|
-
beforeAll: true;
|
|
203
|
-
afterAll: true;
|
|
204
|
-
beforeEach: true;
|
|
205
|
-
afterEach: true;
|
|
206
|
-
onTestFailed: true;
|
|
207
|
-
onTestFinished: true;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
};
|
|
8
|
+
rules: Record<string, RuleModule<any, any>>;
|
|
9
|
+
configs?: Record<string, any>;
|
|
10
|
+
environments?: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
declare const plugin: VitestPLugin;
|
|
212
13
|
|
|
213
14
|
export { plugin as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,213 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ESLint } from 'eslint';
|
|
1
|
+
import { Linter, RuleModule } from '@typescript-eslint/utils/ts-eslint';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
interface VitestPLugin extends Linter.Plugin {
|
|
5
4
|
meta: {
|
|
6
5
|
name: string;
|
|
7
6
|
version: string;
|
|
8
7
|
};
|
|
9
|
-
rules:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"no-conditional-tests": eslint.Rule.RuleModule;
|
|
15
|
-
"expect-expect": eslint.Rule.RuleModule;
|
|
16
|
-
"consistent-test-it": eslint.Rule.RuleModule;
|
|
17
|
-
"prefer-to-be": eslint.Rule.RuleModule;
|
|
18
|
-
"no-hooks": eslint.Rule.RuleModule;
|
|
19
|
-
"no-restricted-vi-methods": eslint.Rule.RuleModule;
|
|
20
|
-
"consistent-test-filename": eslint.Rule.RuleModule;
|
|
21
|
-
"max-expects": eslint.Rule.RuleModule;
|
|
22
|
-
"no-alias-methods": eslint.Rule.RuleModule;
|
|
23
|
-
"no-commented-out-tests": eslint.Rule.RuleModule;
|
|
24
|
-
"no-conditional-expect": eslint.Rule.RuleModule;
|
|
25
|
-
"no-conditional-in-test": eslint.Rule.RuleModule;
|
|
26
|
-
"no-disabled-tests": eslint.Rule.RuleModule;
|
|
27
|
-
"no-done-callback": eslint.Rule.RuleModule;
|
|
28
|
-
"no-duplicate-hooks": eslint.Rule.RuleModule;
|
|
29
|
-
"no-large-snapshots": eslint.Rule.RuleModule;
|
|
30
|
-
"no-interpolation-in-snapshots": eslint.Rule.RuleModule;
|
|
31
|
-
"no-mocks-import": eslint.Rule.RuleModule;
|
|
32
|
-
"no-restricted-matchers": eslint.Rule.RuleModule;
|
|
33
|
-
"no-standalone-expect": eslint.Rule.RuleModule;
|
|
34
|
-
"no-test-prefixes": eslint.Rule.RuleModule;
|
|
35
|
-
"no-test-return-statement": eslint.Rule.RuleModule;
|
|
36
|
-
"no-import-node-test": eslint.Rule.RuleModule;
|
|
37
|
-
"prefer-called-with": eslint.Rule.RuleModule;
|
|
38
|
-
"valid-title": eslint.Rule.RuleModule;
|
|
39
|
-
"valid-expect": eslint.Rule.RuleModule;
|
|
40
|
-
"prefer-to-be-falsy": eslint.Rule.RuleModule;
|
|
41
|
-
"prefer-to-be-object": eslint.Rule.RuleModule;
|
|
42
|
-
"prefer-to-be-truthy": eslint.Rule.RuleModule;
|
|
43
|
-
"prefer-to-have-length": eslint.Rule.RuleModule;
|
|
44
|
-
"prefer-equality-matcher": eslint.Rule.RuleModule;
|
|
45
|
-
"prefer-strict-equal": eslint.Rule.RuleModule;
|
|
46
|
-
"prefer-expect-resolves": eslint.Rule.RuleModule;
|
|
47
|
-
"prefer-each": eslint.Rule.RuleModule;
|
|
48
|
-
"prefer-hooks-on-top": eslint.Rule.RuleModule;
|
|
49
|
-
"prefer-hooks-in-order": eslint.Rule.RuleModule;
|
|
50
|
-
"require-local-test-context-for-concurrent-snapshots": eslint.Rule.RuleModule;
|
|
51
|
-
"prefer-mock-promise-shorthand": eslint.Rule.RuleModule;
|
|
52
|
-
"prefer-vi-mocked": eslint.Rule.RuleModule;
|
|
53
|
-
"prefer-snapshot-hint": eslint.Rule.RuleModule;
|
|
54
|
-
"valid-describe-callback": eslint.Rule.RuleModule;
|
|
55
|
-
"require-top-level-describe": eslint.Rule.RuleModule;
|
|
56
|
-
"require-to-throw-message": eslint.Rule.RuleModule;
|
|
57
|
-
"require-hook": eslint.Rule.RuleModule;
|
|
58
|
-
"prefer-todo": eslint.Rule.RuleModule;
|
|
59
|
-
"prefer-spy-on": eslint.Rule.RuleModule;
|
|
60
|
-
"prefer-comparison-matcher": eslint.Rule.RuleModule;
|
|
61
|
-
"prefer-to-contain": eslint.Rule.RuleModule;
|
|
62
|
-
"prefer-expect-assertions": eslint.Rule.RuleModule;
|
|
63
|
-
"padding-around-after-all-blocks": eslint.Rule.RuleModule;
|
|
64
|
-
"padding-around-after-each-blocks": eslint.Rule.RuleModule;
|
|
65
|
-
"padding-around-all": eslint.Rule.RuleModule;
|
|
66
|
-
"padding-around-before-all-blocks": eslint.Rule.RuleModule;
|
|
67
|
-
"padding-around-before-each-blocks": eslint.Rule.RuleModule;
|
|
68
|
-
"padding-around-describe-blocks": eslint.Rule.RuleModule;
|
|
69
|
-
"padding-around-expect-groups": eslint.Rule.RuleModule;
|
|
70
|
-
"padding-around-test-blocks": eslint.Rule.RuleModule;
|
|
71
|
-
"valid-expect-in-promise": 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: 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: 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
|
-
readonly "vitest/expect-expect": "warn";
|
|
157
|
-
readonly "vitest/no-identical-title": "warn";
|
|
158
|
-
readonly "vitest/no-commented-out-tests": "warn";
|
|
159
|
-
readonly "vitest/valid-title": "warn";
|
|
160
|
-
readonly "vitest/valid-expect": "warn";
|
|
161
|
-
readonly "vitest/valid-describe-callback": "warn";
|
|
162
|
-
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "warn";
|
|
163
|
-
readonly "vitest/no-import-node-test": "warn";
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
env: {
|
|
167
|
-
languageOptions: {
|
|
168
|
-
globals: {
|
|
169
|
-
suite: "writable";
|
|
170
|
-
test: "writable";
|
|
171
|
-
describe: "writable";
|
|
172
|
-
it: "writable";
|
|
173
|
-
expectTypeOf: "writable";
|
|
174
|
-
assertType: "writable";
|
|
175
|
-
expect: "writable";
|
|
176
|
-
assert: "writable";
|
|
177
|
-
vitest: "writable";
|
|
178
|
-
vi: "writable";
|
|
179
|
-
beforeAll: "writable";
|
|
180
|
-
afterAll: "writable";
|
|
181
|
-
beforeEach: "writable";
|
|
182
|
-
afterEach: "writable";
|
|
183
|
-
onTestFailed: "writable";
|
|
184
|
-
onTestFinished: "writable";
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
environments: {
|
|
190
|
-
env: {
|
|
191
|
-
globals: {
|
|
192
|
-
suite: true;
|
|
193
|
-
test: true;
|
|
194
|
-
describe: true;
|
|
195
|
-
it: true;
|
|
196
|
-
expectTypeOf: true;
|
|
197
|
-
assertType: true;
|
|
198
|
-
expect: true;
|
|
199
|
-
assert: true;
|
|
200
|
-
vitest: true;
|
|
201
|
-
vi: true;
|
|
202
|
-
beforeAll: true;
|
|
203
|
-
afterAll: true;
|
|
204
|
-
beforeEach: true;
|
|
205
|
-
afterEach: true;
|
|
206
|
-
onTestFailed: true;
|
|
207
|
-
onTestFinished: true;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
};
|
|
8
|
+
rules: Record<string, RuleModule<any, any>>;
|
|
9
|
+
configs?: Record<string, any>;
|
|
10
|
+
environments?: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
declare const plugin: VitestPLugin;
|
|
212
13
|
|
|
213
14
|
export { plugin as default };
|