Skip to content

Commit a9cf551

Browse files
ManoelLobomrmckeb
authored andcommitted
Update eslint instructions in docs (#5990)
1 parent fbdf156 commit a9cf551

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docusaurus/docs/setting-up-your-editor.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plug
1919

2020
They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do.
2121

22-
You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root:
22+
You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc.json` to the project root:
2323

24-
```js
24+
```json
2525
{
2626
"extends": "react-app"
2727
}
2828
```
2929

3030
Now your editor should report the linting warnings.
3131

32-
Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes.
32+
Note that even if you edit your `.eslintrc.json` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes.
3333

3434
If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules.
3535

packages/eslint-config-react-app/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ First, install this package, ESLint and the necessary plugins.
2222
2323
```
2424

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:
2626

27-
```js
27+
```json
2828
{
2929
"extends": "react-app"
3030
}
3131
```
3232

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.
3434

3535
## Accessibility Checks
3636

@@ -55,7 +55,7 @@ The following rules from the [eslint-plugin-jsx-a11y](https://github.com/evcohen
5555
- [role-supports-aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md)
5656
- [scope](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md)
5757

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:
5959

6060
```json
6161
{

0 commit comments

Comments
 (0)