Skip to content

Commit

Permalink
Feat/update docs flat (#418)
Browse files Browse the repository at this point in the history
* feat(lint): apply lint

* chore(docs): update descriptions for rules

* feat(test): fix tests

* chore(ci): update node version

* chore(checkout): update version of checkout action

* chore(action): update pnpm action

* chore(readme): update readme
  • Loading branch information
veritem authored Apr 9, 2024
1 parent e885ca2 commit 0cce2ff
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 0cce2ff

Please sign in to comment.