https://github.com/mattphillips/eslint-plugin-jest-extended
ESLint plugin for jest-extended matchers
https://github.com/mattphillips/eslint-plugin-jest-extended
eslint jest jest-extended plugin
Last synced: 3 months ago
JSON representation
ESLint plugin for jest-extended matchers
- Host: GitHub
- URL: https://github.com/mattphillips/eslint-plugin-jest-extended
- Owner: mattphillips
- License: mit
- Created: 2017-11-15T13:48:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-16T11:15:13.000Z (over 7 years ago)
- Last Synced: 2025-01-29T09:44:59.628Z (5 months ago)
- Topics: eslint, jest, jest-extended, plugin
- Language: JavaScript
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Roadmap: docs/ROADMAP.md
Awesome Lists containing this project
README
[](https://travis-ci.org/mattphillips/eslint-plugin-jest-extended)
[](https://codecov.io/github/mattphillips/eslint-plugin-jest-extended)
[](https://www.npmjs.com/package/eslint-plugin-jest-extended)
[](http://npm-stat.com/charts.html?package=eslint-plugin-jest-extended&from=2017-09-14)
[](https://github.com/mattphillips/eslint-plugin-jest-extended/blob/master/LICENSE)
[](http://makeapullrequest.com)
[](https://github.com/mattphillips/eslint-plugin-jest-extended/blob/master/docs/ROADMAP.md)
[](https://github.com/mattphillips/eslint-plugin-jest-extended/blob/master/docs/EXAMPLES.md)## Problem
[jest-extended](https://github.com/jest-community/jest-extended) adds many additional matchers to
[Jest's](https://facebook.github.io/jest/) 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:
```sh
npm install --save-dev eslint-plugin-jest-extended
```With yarn:
```sh
yarn add -D eslint-plugin-jest-extended
```## Usage
### Plugin
Add jest-extended to the plugins section of your `.eslintrc` configuration file.
```json
{
"plugins": ["jest-extended"]
}
```See [ESLint plugin](https://eslint.org/docs/user-guide/configuring#configuring-plugins) 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.
```json
{
"extends": ["plugin:jest-extended/recommended"]
}
```See [ESLint configuration](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) 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](https://eslint.org/docs/user-guide/configuring#configuring-rules) documentation for more information
about adjusting rule settings.```json
{
"rules": {
"jest-extended/prefer-to-be-true": "warn",
"jest-extended/prefer-to-be-false": "error"
}
}
```## Inspiration
- [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)
## Contributors
| [
Matt Phillips](http://mattphillips.io)
[💻](https://github.com/mattphillips/eslint-plugin-jest-extended/commits?author=mattphillips "Code") [💡](#example-mattphillips "Examples") [🚇](#infra-mattphillips "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/mattphillips/eslint-plugin-jest-extended/commits?author=mattphillips "Tests") |
| :---: |## LICENSE
[MIT](/LICENSE)