Skip to content

Commit

Permalink
chore: update docs (#240)
Browse files Browse the repository at this point in the history
* chore: update docs

* feat: update grammar

* feat: update grammar

* feat: updated docs
  • Loading branch information
veritem authored Sep 2, 2023
1 parent c5ec82f commit 77e102e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,49 @@ To use the all configuration, extend it in your `.eslintrc` file:
}
```

#### Running on test files only

This plugin assumes that you're running it on tests files only by default which sometimes is not the case. If you can to run it on test files only. Your configuration will look like this:

If you're using `.eslintrc`

```json
{
"extends": ["eslint:recommended"],
"overrides": [
{
"files": ["tests/**"], // or any other pattern
"plugins": ["vitest"],
"extends": ["plugin:vitest/recommended"]
}
]
}
```

If you're using `.eslintrc.js`

```js
import vitest from "eslint-plugin-vitest";

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


### Rules

<!-- begin auto-generated rules list -->
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/expect-expect.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Array of custom expression strings that are converted into a regular expression.

```json
{
"custom-expressions": [
"customExpressions": [
"expectValue",
"mySecondExpression"
]
Expand Down

0 comments on commit 77e102e

Please sign in to comment.