eslint-config-vitest-globals
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

ESLint globals config

Get rid of ESLint errors with one line of code.

error  'vi' is not defined          no-undef
error  'describe' is not defined    no-undef
error  'beforeEach' is not defined  no-undef

Installation

$ npm install --dev eslint-config-vitest-globals
$ yarn add --dev eslint-config-vitest-globals
$ pnpm add --dev eslint-config-vitest-globals

Usage

Flat Config (ESLint >= v9)

Create an eslint.config.js file and import the config:

import vitestGlobals from "eslint-config-vitest-globals/flat";

export default [
  vitestGlobals(),
  // ... your other configs
];

Traditional Config (ESLint <= v8)

Include eslint-config-vitest-globals in your .eslintrc configuration file:

{
  "extends": ["eslint-config-vitest-globals"]
}

License

Released under the MIT License, http://opensource.org/licenses/MIT

Package Sidebar

Install

npm i eslint-config-vitest-globals

Weekly Downloads

2,750

Version

2.0.1

License

MIT

Unpacked Size

2.37 kB

Total Files

6

Last publish

Collaborators

  • tadejpol