Skip to content

Commit

Permalink
feat: add eslint-plugin-vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 28, 2023
1 parent 2080be2 commit 002bb3d
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 79 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -209,6 +209,8 @@ Since flat config requires us to explicitly provide the plugin names (instead of
| `yaml/*` | `yml/*` | [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) |
| `ts/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
| `style/*` | `@stylistic/*` | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) |
| `test/*` | `vitest/*` | [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest) |
| `test/*` | `no-only-tests/*` | [eslint-plugin-no-only-tests](https://github.com/levibuzolic/eslint-plugin-no-only-tests) |

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

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
@@ -1,5 +1,5 @@
import sortKeys from 'eslint-plugin-sort-keys'
import antfu from '@antfu/eslint-config'
import antfu from './dist/index.js'

export default antfu(
{
Expand Down
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -25,6 +25,7 @@
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --clean --dts",
"stub": "tsup src/index.ts --format esm",
"dev": "tsup src/index.ts --format esm,cjs --watch & eslint-flat-config-viewer",
"lint": "pnpm run stub && eslint .",
"prepack": "nr build",
"release": "bumpp && pnpm publish",
Expand All @@ -51,6 +52,7 @@
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-unicorn": "^48.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"eslint-plugin-vitest": "^0.3.1",
"eslint-plugin-vue": "^9.17.0",
"eslint-plugin-yml": "^1.9.0",
"globals": "^13.22.0",
Expand All @@ -66,6 +68,7 @@
"@types/node": "^20.7.1",
"bumpp": "^9.2.0",
"eslint": "^8.50.0",
"eslint-flat-config-viewer": "^0.0.1",
"eslint-plugin-sort-keys": "^2.3.5",
"esno": "^0.17.0",
"fast-glob": "^3.3.1",
Expand Down

0 comments on commit 002bb3d

Please sign in to comment.