Socket
Socket
Sign inDemoInstall

eslint-plugin-vitest

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-vitest

Eslint plugin for vitest


Version published
Weekly downloads
555K
increased by5.01%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-vitest

npm ci

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/max-nested-describe": [
      "error",
      {
        "max": 3
      }
    ]
  }
}

To use the recommended configuration, extend it in your .eslintrc file:

{
  "extends": ["plugin:vitest/recommended"]
}
all

To use the all configuration, extend it in your .eslintrc file:

{
  "extends": ["plugin:vitest/all"]
}

Rules

🔧 Automatically fixable by the --fix CLI option.

Name                  Description🔧
consistent-test-itPrefer test or it but not both🔧
expect-expectEnforce having expectation in test body
max-nested-describeNested describe block should be less than set max value or default value
no-conditional-testsDisallow conditional tests
no-focused-testsDisallow focused tests🔧
no-hooksDisallow setup and teardown hooks
no-identical-titleDisallow identical titles🔧
no-skipped-testsDisallow skipped tests
prefer-lowercase-titleEnforce lowercase titles🔧
prefer-to-beSuggest using toBe()🔧
Credits

Licence

MIT Licence © 2022 - present veritem

Keywords

FAQs

Package last updated on 18 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc