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:
6969
7070Finally, enable all of the rules that you would like to use.
7171
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+
7285# List of supported rules
7386
7487* [ 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
119132
120133# Recommended configuration
121134
122- This plugin export a ` recommended ` configuration that enforce React good practices.
135+ This plugin exports a ` recommended ` configuration that enforce React good practices.
123136
124137To enable this configuration use the ` extends ` property in your ` .eslintrc ` config file:
125138
@@ -128,7 +141,7 @@ To enable this configuration use the `extends` property in your `.eslintrc` conf
128141 " plugins" : [
129142 " react"
130143 ],
131- " extends" : " plugin:react/recommended"
144+ " extends" : [ " eslint:recommended " , " plugin:react/recommended" ]
132145}
133146```
134147
You can’t perform that action at this time.
0 commit comments