Closed dastrong closed 5 years ago
I've added Prettier, while create-react-app (CRA) has already installed ESLint for us.
You can view a list of the ESLint rules here. When you save a file, you'll notice the warnings in your terminal. If you want to know more about that warning, go to that link and read more about it. If you others you want to add, we can create an .eslintrc
file with extra rules, but I don't think it'll be necessary at this point.
You can view the prettierrc.json
to see the non-default settings, I've set for our project.
If you use VS Code, you should install the Prettier extension. You don't need to do anything because of the .vscode
folder I've added to our project. When you save your file, it'll format it nicely for you. If you encounter any bugs or formatting problems, open an issue with a screenshot of it though.
I've also installed a pre-commit hook which should stop you from committing un-Prettified files. This should help keep our code formatting consistent throughout our whole project. You can read more about these here, here, here and here.
We need to set up a development and production environments