File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,19 @@ With ESLint 2.x.x:
69
69
70
70
Finally, enable all of the rules that you would like to use.
71
71
72
+ At a minimum you need to include the rule [ jsx-uses-vars] ( docs/rules/jsx-uses-vars.md ) as without this
73
+ any imports of JSX components will fail falsely claiming they're defined but not used.
74
+
75
+ ``` json
76
+ {
77
+ "rules" : {
78
+ "react/jsx-uses-vars" : 2
79
+ }
80
+ }
81
+ ```
82
+
83
+ The plugin has a [ recommended configuration] ( #user-content-recommended-configuration ) that enforces React good practices.
84
+
72
85
# List of supported rules
73
86
74
87
* [ display-name] ( docs/rules/display-name.md ) : Prevent missing ` displayName ` in a React component definition
@@ -119,7 +132,7 @@ If you're searching for React Native specific linting rules, check out [eslint-p
119
132
120
133
# Recommended configuration
121
134
122
- This plugin export a ` recommended ` configuration that enforce React good practices.
135
+ This plugin exports a ` recommended ` configuration that enforce React good practices.
123
136
124
137
To enable this configuration use the ` extends ` property in your ` .eslintrc ` config file:
125
138
@@ -128,7 +141,7 @@ To enable this configuration use the `extends` property in your `.eslintrc` conf
128
141
" plugins" : [
129
142
" react"
130
143
],
131
- " extends" : " plugin:react/recommended"
144
+ " extends" : [ " eslint:recommended " , " plugin:react/recommended" ]
132
145
}
133
146
```
134
147
You can’t perform that action at this time.
0 commit comments