JSPM

  • Created
  • Published
  • Downloads 580086
  • Score
    100M100P100Q178943F
  • License MIT

Eslint plugin for vitest

Package Exports

  • eslint-plugin-vitest

Readme

eslint-plugin-vitest

npm ci

Disclaimer: This package is very experimental

Eslint plugin for vitest

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-vitest:

npm install eslint-plugin-vitest --save-dev

Usage

Add vitest to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["vitest"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "vitest/no-skipped-tests": 2
  }
}

Supported Rules

  • No Skipped tests
  • No Focused tests
  • Lower case title
  • Max number of nested describe blocks
{
  "rules": {
    "vitest/max-nested-describe": [
      "error",
      {
        "max": 3
      }
    ]
  }
}

Licence

MIT Licence © 2022 - present veritem