You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup.md
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,29 @@
1
1
In order to use the react eslint plugin do the following...
2
2
3
3
1. At the root of your project type <code>npm install eslint-plugin-react --save-dev</code>
4
-
2. Check your package.json 'devDependencies' for the following entries (version numbers may vary)...
4
+
2. Check your package.json 'devDependencies' for the following entries (version numbers may vary, but it's important that **the eslint version matches the peerDependency version in eslint-plugin-react**)...
5
5
<pre>
6
6
"devDependencies": {
7
7
"eslint": "^3.19.0",
8
8
"eslint-plugin-react": "^6.10.3"
9
9
}
10
10
</pre>
11
-
3.In your eslint configuration file (.eslint.rc / package.json etc.) add the following under 'esLintConfig'...
11
+
3.If configuring using package.json add the following under 'esLintConfig'...
12
12
<pre>
13
13
"eslintConfig": {
14
14
"plugins": [
15
15
"react"
16
16
]
17
17
}
18
18
</pre>
19
+
Else, in your eslint configuration file (.eslintrc) add the following...
20
+
<pre>
21
+
{
22
+
"plugins": [
23
+
"react"
24
+
]
25
+
}
26
+
</pre>
19
27
4. Configure the rules you want to use according to the [rules docs](/docs/rules). Here's a sample of some of mine...
0 commit comments