eslint-config-vitest-globals
Version:
Tiny vitest-eslint library contains globals for vitest
47 lines (32 loc) • 934 B
Markdown
Get rid of ESLint errors with one line of code.
```bash
error 'vi' is not defined no-undef
error 'describe' is not defined no-undef
error 'beforeEach' is not defined no-undef
```
```bash
$ npm install --dev eslint-config-vitest-globals
$ yarn add --dev eslint-config-vitest-globals
$ pnpm add --dev eslint-config-vitest-globals
```
Create an `eslint.config.js` file and import the config:
```js
import vitestGlobals from "eslint-config-vitest-globals/flat";
export default [
vitestGlobals(),
// ... your other configs
];
```
Include `eslint-config-vitest-globals` in your `.eslintrc` configuration file:
```json
{
"extends": ["eslint-config-vitest-globals"]
}
```
Released under the MIT License, [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)