Personal ESLint and Prettier config
Whats included?
- Standard config base;
- React plugin;
- React Hooks plugin;
- Import helpers plugin;
- JSX a11y plugin;
- Prettier;
Setup
- Install the dependencies
npm i -D eslint @diogop_96/eslint-prettier-config
- Create a
.eslintrc.js
file extending the config:
{
"extends": "@diogop_96/eslint-prettier-config/react"
}
- Create a
.prettierrc.js
file extending the config:
module.exports = {
...require("@diogop_96/eslint-prettier-config/prettier"),
// your overwrite
printWidth: 140,
tabWidth: 4
};