Skip to content

Commit

Permalink
chore(readme): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
veritem committed Apr 9, 2024
1 parent 39014ae commit 8006fde
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,30 @@ Vitest ships with an optional [type-testing feature](https://vitest.dev/guide/te

If you're using this feature, you should also enabled `typecheck` in the settings for this plugin. This ensures that rules like [expect-expect](docs/rules/expect-expect.md) account for type-related assertions in tests.

```json
{
"extends": ["plugin:vitest/recommended"],
"settings" :{
"vitest": {
"typecheck": true,
}
}
}
```js
import vitest from "eslint-plugin-vitest";

export default [
{
files: ["tests/**"], // or any other pattern
plugins: {
vitest,
},
rules: {
...vitest.configs.recommended.rules,
},
settings: {
vitest: {
typecheck: true
}
},
languageOptions: {
globals: {
...vitest.environments.env.globals,
},
},
},
]
```

### Rules
Expand Down

0 comments on commit 8006fde

Please sign in to comment.