Socket
Socket
Sign inDemoInstall

eslint-plugin-jest-dom

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jest-dom - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

docs/rules/prefer-checked.md

11

lib/index.js

@@ -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',
},
},
};

2

package.json
{
"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__ -->
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