'How to install / setup Eslint, Prettier into a react app?
I am learning React, and now I am trying to understand the eslint, prettier, and install into my react project.
BUT I am confused about how to set this up, and what order to do this.
I am using create-react-app to create the app and then using JavaScript.
Solution 1:[1]
Hi i would start with reading the eslint docs, install eslint using a package manager, and create your .eslintrc.json config file.
Once you have added eslint, then you need to add prettier to your config. Follow how to add prettier from their github. You need to install it with a package manager, then extend your eslint with prettier.
Your .eslint.json should look like
...
"extends": [
"some-other-config-you-use",
"prettier"
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Daniel Loudon |
