Skip to content

mattphillips/eslint-plugin-jest-extended

Repository files navigation

eslint-plugin-jest-extended

ESLint plugin for jest-extended matchers


Build Status Code Coverage version downloads MIT License PRs Welcome Roadmap Examples

Problem

jest-extended adds many additional matchers to Jest's default assertions but knowing when to use these matchers isn't always obvious.

Solution

eslint-plugin-jest-extended aims to tell you when you should use a specific matcher available in jest-extended.

Installation

With npm:

npm install --save-dev eslint-plugin-jest-extended

With yarn:

yarn add -D eslint-plugin-jest-extended

Usage

Plugin

Add jest-extended to the plugins section of your .eslintrc configuration file.

{
  "plugins": ["jest-extended"]
}

See ESLint plugin documentation for more information about using plugins.

Recommended configuration

Add jest-extended to the extends section of your .eslintrc configuration file to use the recommended setup.

{
  "extends": ["plugin:jest-extended/recommended"]
}

See ESLint configuration documentation for more information about extending configuration files.

Rules

Add rules to your .eslintrc configuration file to either use a rule or override the default configuration if you are using the recommended setup.

See ESLint rules documentation for more information about adjusting rule settings.

{
  "rules": {
    "jest-extended/prefer-to-be-true": "warn",
    "jest-extended/prefer-to-be-false": "error"
  }
}

Inspiration

Contributors


Matt Phillips

💻 💡 🚇 ⚠️

LICENSE

MIT

About

ESLint plugin for jest-extended matchers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published