@pplancq/eslint-config 6.1.4 → 6.2.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/CHANGELOG.md +31 -0
- package/README.md +17 -1
- package/main.js +81 -25
- package/package.json +14 -11
- package/rules/base.js +2 -2
- package/rules/import.js +269 -262
- package/rules/playwright.js +3 -2
- package/rules/prettier.js +2 -2
- package/rules/react-jsx-a11y.js +216 -218
- package/rules/react.js +604 -591
- package/rules/typescript.js +554 -548
- package/rules/utils.js +63 -0
- package/rules/vitest.js +176 -168
package/rules/utils.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renames the namespace of rule names (`from/rule` becomes `to/rule`).
|
|
3
|
+
*
|
|
4
|
+
* @param {Record<string, unknown>} rules
|
|
5
|
+
* @param {string} from namespace used to write the rules
|
|
6
|
+
* @param {string} to namespace the rules must be registered under
|
|
7
|
+
*/
|
|
8
|
+
export const prefix = (rules, from, to) => {
|
|
9
|
+
if (from === to) {
|
|
10
|
+
return rules;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return Object.fromEntries(
|
|
14
|
+
Object.entries(rules).map(([name, value]) => [
|
|
15
|
+
name.startsWith(`${from}/`) ? `${to}/${name.slice(from.length + 1)}` : name,
|
|
16
|
+
value,
|
|
17
|
+
]),
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const LEGACY_SETTINGS_PREFIX = "import/";
|
|
22
|
+
const SETTINGS_PREFIX = "import-x/";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* eslint-plugin-import-x only reads the `import-x/*` settings, whatever the namespace its rules are registered under.
|
|
26
|
+
* Copies the `import/*` settings of the given configs to `import-x/*` (the original keys are kept,
|
|
27
|
+
* and an existing `import-x/*` setting always wins). The given configs are not mutated.
|
|
28
|
+
*
|
|
29
|
+
* @param {Array<import('eslint').Linter.Config>} configs
|
|
30
|
+
* @returns {{ configs: Array<import('eslint').Linter.Config>, mapped: string[] }} the new configs and the mapped `import/*` setting names
|
|
31
|
+
*/
|
|
32
|
+
export const mapLegacyImportSettings = (configs) => {
|
|
33
|
+
const mapped = new Set();
|
|
34
|
+
|
|
35
|
+
const mappedConfigs = configs.map((config) => {
|
|
36
|
+
if (!config || typeof config !== "object" || !config.settings || typeof config.settings !== "object") {
|
|
37
|
+
return config;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const additions = Object.fromEntries(
|
|
41
|
+
Object.entries(config.settings)
|
|
42
|
+
.filter(([key]) => key.startsWith(LEGACY_SETTINGS_PREFIX))
|
|
43
|
+
.map(([key, value]) => [`${SETTINGS_PREFIX}${key.slice(LEGACY_SETTINGS_PREFIX.length)}`, { key, value }])
|
|
44
|
+
.filter(([newKey]) => !(newKey in config.settings)),
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
if (Object.keys(additions).length === 0) {
|
|
48
|
+
return config;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Object.values(additions).forEach(({ key }) => mapped.add(key));
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
...config,
|
|
55
|
+
settings: {
|
|
56
|
+
...config.settings,
|
|
57
|
+
...Object.fromEntries(Object.entries(additions).map(([newKey, { value }]) => [newKey, value])),
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return { configs: mappedConfigs, mapped: [...mapped] };
|
|
63
|
+
};
|
package/rules/vitest.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import vitestPlugin from "@vitest/eslint-plugin";
|
|
2
|
+
/* eslint-disable import/extensions */
|
|
3
|
+
import { prefix } from "./utils.js";
|
|
4
|
+
/* eslint-enable import/extensions */
|
|
2
5
|
|
|
3
|
-
export const vitestRules = {
|
|
6
|
+
export const vitestRules = ({ files, import: importNs = "import-x" } = {}) => ({
|
|
4
7
|
plugins: {
|
|
5
8
|
"@vitest": vitestPlugin,
|
|
6
9
|
},
|
|
@@ -9,225 +12,230 @@ export const vitestRules = {
|
|
|
9
12
|
...vitestPlugin.environments.env.globals,
|
|
10
13
|
},
|
|
11
14
|
},
|
|
12
|
-
rules:
|
|
13
|
-
|
|
15
|
+
rules: prefix(
|
|
16
|
+
{
|
|
17
|
+
// eslint-plugin-import-x https://github.com/un-ts/eslint-plugin-import-x
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
// import-x/no-extraneous-dependencies
|
|
20
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-extraneous-dependencies.md
|
|
21
|
+
"import-x/no-extraneous-dependencies": "off",
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
// eslint-plugin-vitest https://github.com/veritem/eslint-plugin-vitest
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
// Require `.spec` test file pattern
|
|
26
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
27
|
+
"@vitest/consistent-test-filename": "off",
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
// Enforce using `test` or `it` but not both
|
|
30
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md
|
|
31
|
+
"@vitest/consistent-test-it": "off",
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
// Enforce having expectation in test body
|
|
34
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
|
|
35
|
+
"@vitest/expect-expect": "off",
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
// Enforce a maximum number of `expect` per test
|
|
38
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
|
|
39
|
+
"@vitest/max-expects": "off",
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
// Require `describe` block to be less than set max value or default value
|
|
42
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md
|
|
43
|
+
"@vitest/max-nested-describe": "off",
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
// Disallow alias methods
|
|
46
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md
|
|
47
|
+
"@vitest/no-alias-methods": "off",
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
// Disallow commented out tests
|
|
50
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md
|
|
51
|
+
"@vitest/no-commented-out-tests": "off",
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
// Disallow conditional expects
|
|
54
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md
|
|
55
|
+
"@vitest/no-conditional-expect": "error",
|
|
52
56
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
// Disallow conditional tests
|
|
58
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md
|
|
59
|
+
"@vitest/no-conditional-in-test": "off",
|
|
56
60
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
// Disallow conditional tests
|
|
62
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md
|
|
63
|
+
"@vitest/no-conditional-tests": "off",
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
// Disallow disabled tests
|
|
66
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md
|
|
67
|
+
"@vitest/no-disabled-tests": "off",
|
|
64
68
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
// Disallow using a callback in asynchronous tests and hooks
|
|
70
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md
|
|
71
|
+
"@vitest/no-done-callback": "off",
|
|
68
72
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
// Disallow duplicate hooks and teardown hooks
|
|
74
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md
|
|
75
|
+
"@vitest/no-duplicate-hooks": "off",
|
|
72
76
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
// Disallow focused tests
|
|
78
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md
|
|
79
|
+
"@vitest/no-focused-tests": "off",
|
|
76
80
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
// Disallow setup and teardown hooks
|
|
82
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md
|
|
83
|
+
"@vitest/no-hooks": "off",
|
|
80
84
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
// Disallow identical titles
|
|
86
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md
|
|
87
|
+
"@vitest/no-identical-title": "error",
|
|
84
88
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
// Disallow importing `node:test`
|
|
90
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
|
|
91
|
+
"@vitest/no-import-node-test": "off",
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
// Disallow string interpolation in snapshots
|
|
94
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md
|
|
95
|
+
"@vitest/no-interpolation-in-snapshots": "error",
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
// Disallow large snapshots
|
|
98
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md
|
|
99
|
+
"@vitest/no-large-snapshots": "off",
|
|
96
100
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
// Disallow importing from `mocks` directory
|
|
102
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md
|
|
103
|
+
"@vitest/no-mocks-import": "error",
|
|
100
104
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
// Disallow the use of certain matchers
|
|
106
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md
|
|
107
|
+
"@vitest/no-restricted-matchers": "off",
|
|
104
108
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
// Disallow specific `vi.` methods
|
|
110
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md
|
|
111
|
+
"@vitest/no-restricted-vi-methods": "off",
|
|
108
112
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
// Disallow using `expect` outside of `it` or `test` blocks
|
|
114
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md
|
|
115
|
+
"@vitest/no-standalone-expect": "off",
|
|
112
116
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
// Disallow using `test` as a prefix
|
|
118
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md
|
|
119
|
+
"@vitest/no-test-prefixes": "off",
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
// Disallow `return` statements in tests
|
|
122
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
|
|
123
|
+
"@vitest/no-test-return-statement": "off",
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
// Enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
|
|
126
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
|
|
127
|
+
"@vitest/prefer-called-with": "error",
|
|
124
128
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
// Enforce using the built-in comparison matchers
|
|
130
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md
|
|
131
|
+
"@vitest/prefer-comparison-matcher": "off",
|
|
128
132
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
// Enforce using `each` rather than manual loops
|
|
134
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md
|
|
135
|
+
"@vitest/prefer-each": "off",
|
|
132
136
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
// Enforce using the built-in quality matchers
|
|
138
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
|
|
139
|
+
"@vitest/prefer-equality-matcher": "off",
|
|
136
140
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
// Enforce using `expect` assertions instead of callbacks
|
|
142
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-assertions.md
|
|
143
|
+
"@vitest/prefer-expect-assertions": "off",
|
|
140
144
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
// Enforce using `expect().resolves` over `expect(await ...)` syntax
|
|
146
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
|
|
147
|
+
"@vitest/prefer-expect-resolves": "off",
|
|
144
148
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
149
|
+
// Enforce having hooks in consistent order (`vitest/prefer-hooks-in-order`)
|
|
150
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
|
|
151
|
+
"@vitest/prefer-hooks-in-order": "off",
|
|
148
152
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
153
|
+
// Enforce having hooks before any test cases
|
|
154
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
|
|
155
|
+
"@vitest/prefer-hooks-on-top": "off",
|
|
152
156
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
// Enforce lowercase titles
|
|
158
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md
|
|
159
|
+
"@vitest/prefer-lowercase-title": "off",
|
|
156
160
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
// Enforce mock resolved/rejected shorthands for promises
|
|
162
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
|
|
163
|
+
"@vitest/prefer-mock-promise-shorthand": "off",
|
|
160
164
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
165
|
+
// Enforce including a hint with external snapshots
|
|
166
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
|
|
167
|
+
"@vitest/prefer-snapshot-hint": "off",
|
|
164
168
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
// Enforce using `vi.spyOn`
|
|
170
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md
|
|
171
|
+
"@vitest/prefer-spy-on": "off",
|
|
168
172
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
// Enforce strict equal over equal
|
|
174
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md
|
|
175
|
+
"@vitest/prefer-strict-equal": "error",
|
|
172
176
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
177
|
+
// Enforce using `toBe()`
|
|
178
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md
|
|
179
|
+
"@vitest/prefer-to-be": "off",
|
|
176
180
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
// Enforce using `toBeFalsy()`
|
|
182
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md
|
|
183
|
+
"@vitest/prefer-to-be-falsy": "error",
|
|
180
184
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
185
|
+
// Enforce using `toBeObject()`
|
|
186
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md
|
|
187
|
+
"@vitest/prefer-to-be-object": "error",
|
|
184
188
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
189
|
+
// Enforce using `toBeTruthy`
|
|
190
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md
|
|
191
|
+
"@vitest/prefer-to-be-truthy": "error",
|
|
188
192
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
// Enforce using `toContain()`
|
|
194
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
|
|
195
|
+
"@vitest/prefer-to-contain": "error",
|
|
192
196
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
// Enforce using `toHaveLength()`
|
|
198
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
|
|
199
|
+
"@vitest/prefer-to-have-length": "error",
|
|
196
200
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
// Enforce using `test.todo`
|
|
202
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md
|
|
203
|
+
"@vitest/prefer-todo": "off",
|
|
200
204
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
205
|
+
// Require setup and teardown to be within a hook
|
|
206
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
207
|
+
"@vitest/require-hook": "off",
|
|
204
208
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
209
|
+
// Require local Test Context for concurrent snapshot tests
|
|
210
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
|
|
211
|
+
"@vitest/require-local-test-context-for-concurrent-snapshots": "off",
|
|
208
212
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
213
|
+
// Require `toThrow()` to be called with an error message
|
|
214
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
|
|
215
|
+
"@vitest/require-to-throw-message": "off",
|
|
212
216
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
217
|
+
// Enforce that all tests are in a top-level `describe`
|
|
218
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md
|
|
219
|
+
"@vitest/require-top-level-describe": "off",
|
|
216
220
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
221
|
+
// Enforce unbound methods are called with their expected scope
|
|
222
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/unbound-method.md
|
|
223
|
+
"@vitest/unbound-method": "off",
|
|
220
224
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
225
|
+
// Enforce valid `describe` callback
|
|
226
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md
|
|
227
|
+
"@vitest/valid-describe-callback": "error",
|
|
224
228
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
// Enforce valid `expect()` usage
|
|
230
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md
|
|
231
|
+
"@vitest/valid-expect": "error",
|
|
228
232
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
// Enforce valid titles
|
|
234
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
|
|
235
|
+
"@vitest/valid-title": "warn",
|
|
236
|
+
},
|
|
237
|
+
"import-x",
|
|
238
|
+
importNs,
|
|
239
|
+
),
|
|
240
|
+
files,
|
|
241
|
+
});
|