Skip to content

Commit 002bb3d

Browse files
committed
feat: add eslint-plugin-vitest
1 parent 2080be2 commit 002bb3d

File tree

6 files changed

+179
-79
lines changed

6 files changed

+179
-79
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ Since flat config requires us to explicitly provide the plugin names (instead of
209209
| `yaml/*` | `yml/*` | [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) |
210210
| `ts/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
211211
| `style/*` | `@stylistic/*` | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) |
212+
| `test/*` | `vitest/*` | [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest) |
213+
| `test/*` | `no-only-tests/*` | [eslint-plugin-no-only-tests](https://github.com/levibuzolic/eslint-plugin-no-only-tests) |
212214

213215
When you want to overrides rules, or disable them inline, you need to update to the new prefix:
214216

eslint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sortKeys from 'eslint-plugin-sort-keys'
2-
import antfu from '@antfu/eslint-config'
2+
import antfu from './dist/index.js'
33

44
export default antfu(
55
{

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"scripts": {
2626
"build": "tsup src/index.ts --format esm,cjs --clean --dts",
2727
"stub": "tsup src/index.ts --format esm",
28+
"dev": "tsup src/index.ts --format esm,cjs --watch & eslint-flat-config-viewer",
2829
"lint": "pnpm run stub && eslint .",
2930
"prepack": "nr build",
3031
"release": "bumpp && pnpm publish",
@@ -51,6 +52,7 @@
5152
"eslint-plugin-no-only-tests": "^3.1.0",
5253
"eslint-plugin-unicorn": "^48.0.1",
5354
"eslint-plugin-unused-imports": "^3.0.0",
55+
"eslint-plugin-vitest": "^0.3.1",
5456
"eslint-plugin-vue": "^9.17.0",
5557
"eslint-plugin-yml": "^1.9.0",
5658
"globals": "^13.22.0",
@@ -66,6 +68,7 @@
6668
"@types/node": "^20.7.1",
6769
"bumpp": "^9.2.0",
6870
"eslint": "^8.50.0",
71+
"eslint-flat-config-viewer": "^0.0.1",
6972
"eslint-plugin-sort-keys": "^2.3.5",
7073
"esno": "^0.17.0",
7174
"fast-glob": "^3.3.1",

0 commit comments

Comments
 (0)