Update eslint instructions in docs (#5990)

This commit is contained in:
Manoel
2018-12-08 05:02:58 -02:00
committed by Brody McKee
parent fbdf156aad
commit a9cf551db7
2 changed files with 7 additions and 7 deletions

View File

@@ -19,9 +19,9 @@ Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plug
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.
You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root:
You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc.json` to the project root:
```js
```json
{
"extends": "react-app"
}
@@ -29,7 +29,7 @@ You would need to install an ESLint plugin for your editor first. Then, add a fi
Now your editor should report the linting warnings.
Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They wont 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.
Note that even if you edit your `.eslintrc.json` file further, these changes will **only affect the editor integration**. They wont 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.
If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules.