eslint-plugin-jest-dom
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -19,1 +19,12 @@ /** | ||
module.exports.rules = requireIndex(__dirname + '/rules'); | ||
module.exports.configs = { | ||
recommended: { | ||
plugins: ['jest-dom'], | ||
rules: { | ||
'jest-dom/prefer-checked': 'error', | ||
'jest-dom/prefer-enabled-disabled': 'error', | ||
'jest-dom/prefer-required': 'error', | ||
}, | ||
}, | ||
}; |
{ | ||
"name": "eslint-plugin-jest-dom", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "lint rules for use with jest-dom", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -27,9 +27,6 @@ # eslint-plugin-jest-dom | ||
{ | ||
"plugins": [ | ||
"jest-dom" | ||
] | ||
"plugins": ["jest-dom"] | ||
} | ||
``` | ||
Then configure the rules you want to use under the rules section. | ||
@@ -39,10 +36,25 @@ | ||
{ | ||
"rules": { | ||
"jest-dom/prefer-checked": "error", | ||
"jest-dom/prefer-enabled-disabled": "error", | ||
"jest-dom/prefer-required": "error" | ||
} | ||
"rules": { | ||
"jest-dom/prefer-checked": "error", | ||
"jest-dom/prefer-enabled-disabled": "error", | ||
"jest-dom/prefer-required": "error" | ||
} | ||
} | ||
``` | ||
## Recommended Configuration | ||
This plugin exports a recommended configuration that enforces good | ||
`jest-dom` practices _(you can find more info about enabled rules | ||
in [Supported Rules section](#supported-rules))_. | ||
To enable this configuration use the `extends` property in your | ||
`.eslintrc` config file: | ||
```json | ||
{ | ||
"extends": ["plugin:jest-dom/recommended"] | ||
} | ||
``` | ||
## Supported Rules | ||
@@ -55,12 +67,9 @@ | ||
<!-- __BEGIN AUTOGENERATED TABLE__ --> | ||
Name | ✔️ | 🛠 | Description | ||
----- | ----- | ----- | ----- | ||
[prefer-checked](https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-checked.md) | ✔️ | 🛠 | prefer toBeChecked over checking attributes | ||
[prefer-enabled-disabled](https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-enabled-disabled.md) | ✔️ | 🛠 | prefer toBeDisabled or toBeEnabled over checking attributes | ||
[prefer-required](https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-required.md) | ✔️ | 🛠 | prefer toBeRequired over checking properties | ||
<!-- __END AUTOGENERATED TABLE__ --> | ||
| Name | ✔️ | 🛠 | Description | | ||
| -------------------------------------------------------------------------------------------------------------------------------------- | --- | --- | ----------------------------------------------------------- | | ||
| [prefer-checked](https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-checked.md) | ✔️ | 🛠 | prefer toBeChecked over checking attributes | | ||
| [prefer-enabled-disabled](https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-enabled-disabled.md) | ✔️ | 🛠 | prefer toBeDisabled or toBeEnabled over checking attributes | | ||
| [prefer-required](https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-required.md) | ✔️ | 🛠 | prefer toBeRequired over checking properties | | ||
<!-- __END AUTOGENERATED TABLE__ --> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23872
20
430
73