@vitest/eslint-plugin 1.3.20 → 1.3.23
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 +25 -0
- package/dist/index.cjs +6597 -8
- package/dist/index.d.cts +814 -806
- package/dist/index.d.ts +941 -0
- package/dist/index.js +6569 -0
- package/package.json +13 -20
- package/dist/index.d.mts +0 -930
- package/dist/index.mjs +0 -8
package/README.md
CHANGED
|
@@ -105,6 +105,31 @@ export default [
|
|
|
105
105
|
]
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
### Custom Fixtures
|
|
109
|
+
|
|
110
|
+
If you're using custom fixtures in a separate file and importing them in your tests, you can let the plugin know about them by adding them to the `vitestImports` setting. The property accepts an array of strings or regular expressions that match the module names where your custom fixtures are defined.
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
import vitest from '@vitest/eslint-plugin'
|
|
114
|
+
|
|
115
|
+
export default [
|
|
116
|
+
{
|
|
117
|
+
files: ['tests/**'], // or any other pattern
|
|
118
|
+
plugins: {
|
|
119
|
+
vitest,
|
|
120
|
+
},
|
|
121
|
+
rules: {
|
|
122
|
+
...vitest.configs.recommended.rules,
|
|
123
|
+
},
|
|
124
|
+
settings: {
|
|
125
|
+
vitest: {
|
|
126
|
+
vitestImports: ['@/tests/fixtures', /test-extend$/],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
]
|
|
131
|
+
```
|
|
132
|
+
|
|
108
133
|
### Shareable configurations
|
|
109
134
|
|
|
110
135
|
#### Recommended
|