Prettier is not working at React project

Go to settings and type default formatter which is null at the beginning. Change it to esbenp.prettier-vscode. This is what is working for me. Hope it does for you.


You'll need to add the esLint react plugin.

"extends: ["eslint:recommended", "plugin:react/recommended", ...]

This will add the react/jsx-uses-react rule which will prevent React from being incorrectly marked as unused when JSX is in use.