eslint-config-react-app 3.0.5 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +8 -8
  2. package/index.js +7 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  This package includes the shareable ESLint configuration used by [Create React App](https://github.com/facebook/create-react-app).<br>
4
4
  Please refer to its documentation:
5
5
 
6
- - [Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
- - [User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
6
+ - [Getting Started](https://facebook.github.io/create-react-app/docs/getting-started) – How to create a new app.
7
+ - [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
8
8
 
9
9
  ## Usage in Create React App Projects
10
10
 
@@ -14,7 +14,7 @@ The easiest way to use this configuration is with [Create React App](https://git
14
14
 
15
15
  ## Usage Outside of Create React App
16
16
 
17
- If you want to use this ESLint configuration in a project not built with Create React App, you can install it with following steps.
17
+ If you want to use this ESLint configuration in a project not built with Create React App, you can install it with the following steps.
18
18
 
19
19
  First, install this package, ESLint and the necessary plugins.
20
20
 
@@ -22,15 +22,15 @@ First, install this package, ESLint and the necessary plugins.
22
22
  npm install --save-dev eslint-config-react-app babel-eslint@9.x eslint@5.x eslint-plugin-flowtype@2.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x
23
23
  ```
24
24
 
25
- Then create a file named `.eslintrc` with following contents in the root folder of your project:
25
+ Then create a file named `.eslintrc.json` with following contents in the root folder of your project:
26
26
 
27
- ```js
27
+ ```json
28
28
  {
29
29
  "extends": "react-app"
30
30
  }
31
31
  ```
32
32
 
33
- That's it! You can override the settings from `eslint-config-react-app` by editing the `.eslintrc` file. Learn more about [configuring ESLint](http://eslint.org/docs/user-guide/configuring) on the ESLint website.
33
+ That's it! You can override the settings from `eslint-config-react-app` by editing the `.eslintrc.json` file. Learn more about [configuring ESLint](http://eslint.org/docs/user-guide/configuring) on the ESLint website.
34
34
 
35
35
  ## Accessibility Checks
36
36
 
@@ -55,7 +55,7 @@ The following rules from the [eslint-plugin-jsx-a11y](https://github.com/evcohen
55
55
  - [role-supports-aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md)
56
56
  - [scope](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md)
57
57
 
58
- If you want to enable even more accessibility rules, you can create an `.eslintrc` file in the root of your project with this content:
58
+ If you want to enable even more accessibility rules, you can create an `.eslintrc.json` file in the root of your project with this content:
59
59
 
60
60
  ```json
61
61
  {
@@ -64,4 +64,4 @@ If you want to enable even more accessibility rules, you can create an `.eslintr
64
64
  }
65
65
  ```
66
66
 
67
- However, if you are using [Create React App](https://github.com/facebook/create-react-app) and have not ejected, any additional rules will only be displayed in the [IDE integrations](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor), but not in the browser or the terminal.
67
+ However, if you are using [Create React App](https://github.com/facebook/create-react-app) and have not ejected, any additional rules will only be displayed in the [IDE integrations](https://facebook.github.io/create-react-app/docs/setting-up-your-editor#displaying-lint-output-in-the-editor), but not in the browser or the terminal.
package/index.js CHANGED
@@ -46,6 +46,12 @@ module.exports = {
46
46
  },
47
47
  },
48
48
 
49
+ settings: {
50
+ react: {
51
+ version: 'detect',
52
+ },
53
+ },
54
+
49
55
  rules: {
50
56
  // http://eslint.org/docs/rules/
51
57
  'array-callback-return': 'warn',
@@ -205,6 +211,7 @@ module.exports = {
205
211
  // 'react/no-deprecated': 'warn',
206
212
  'react/no-direct-mutation-state': 'warn',
207
213
  'react/no-is-mounted': 'warn',
214
+ 'react/no-typos': 'error',
208
215
  'react/react-in-jsx-scope': 'error',
209
216
  'react/require-render-return': 'error',
210
217
  'react/style-prop-object': 'warn',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-react-app",
3
- "version": "3.0.5",
3
+ "version": "3.0.8",
4
4
  "description": "ESLint configuration used by Create React App",
5
5
  "repository": "facebook/create-react-app",
6
6
  "license": "MIT",
@@ -19,6 +19,6 @@
19
19
  "eslint-plugin-react": "7.x"
20
20
  },
21
21
  "dependencies": {
22
- "confusing-browser-globals": "^1.0.5"
22
+ "confusing-browser-globals": "^1.0.6"
23
23
  }
24
24
  }