@@ -24,22 +24,34 @@ Add `jest-dom` to the plugins section of your `.eslintrc` configuration file. Yo
2424
2525``` json
2626{
27- "plugins" : [
28- " jest-dom"
29- ]
27+ "plugins" : [" jest-dom" ]
3028}
3129```
3230
33-
3431Then configure the rules you want to use under the rules section.
3532
3633``` json
3734{
38- "rules" : {
39- "jest-dom/prefer-checked" : " error" ,
40- "jest-dom/prefer-enabled-disabled" : " error" ,
41- "jest-dom/prefer-required" : " error"
42- }
35+ "rules" : {
36+ "jest-dom/prefer-checked" : " error" ,
37+ "jest-dom/prefer-enabled-disabled" : " error" ,
38+ "jest-dom/prefer-required" : " error"
39+ }
40+ }
41+ ```
42+
43+ ## Recommended Configuration
44+
45+ This plugin exports a recommended configuration that enforces good
46+ ` jest-dom ` practices _ (you can find more info about enabled rules
47+ in [ Supported Rules section] ( #supported-rules ) )_ .
48+
49+ To enable this configuration use the ` extends ` property in your
50+ ` .eslintrc ` config file:
51+
52+ ``` json
53+ {
54+ "extends" : [" plugin:jest-dom/recommended" ]
4355}
4456```
4557
@@ -50,14 +62,11 @@ Then configure the rules you want to use under the rules section.
5062🛠 indicates that a rule is fixable.
5163
5264<!-- __BEGIN AUTOGENERATED TABLE__ -->
53- Name | ✔️ | 🛠 | Description
54- ----- | ----- | ----- | -----
55- [ prefer-checked] ( https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-checked.md ) | ✔️ | 🛠 | prefer toBeChecked over checking attributes
56- [ 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
57- [ prefer-required] ( https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-required.md ) | ✔️ | 🛠 | prefer toBeRequired over checking properties
58- <!-- __END AUTOGENERATED TABLE__ -->
59-
60-
61-
6265
66+ | Name | ✔️ | 🛠 | Description |
67+ | -------------------------------------------------------------------------------------------------------------------------------------- | --- | --- | ----------------------------------------------------------- |
68+ | [ prefer-checked] ( https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-checked.md ) | ✔️ | 🛠 | prefer toBeChecked over checking attributes |
69+ | [ 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 |
70+ | [ prefer-required] ( https://github.com/testing-library/eslint-plugin-jest-dom/blob/master/docs/rules/prefer-required.md ) | ✔️ | 🛠 | prefer toBeRequired over checking properties |
6371
72+ <!-- __END AUTOGENERATED TABLE__ -->
0 commit comments