- React plugin;
- React Hooks plugin;
- JSX a11y plugin;
- Import Helpers;
- Prettier;
Install dependencies
npm i -D @gustavogvbs/eslint-config
Inside the configuration file: .eslintrc.json
{
"extends": ["@gustavogvbs/eslint-config/react"]
}
or
{
"extends": "@gustavogvbs/eslint-config/react"
}
Inside .prettierrc.json
{
"extends": "gustavogvbs/eslint-config/prettier"
}
Adding plugin configuration eslint-plugin-import-helpers
Inside .eslintrc.json
{
"extends": ["@gustavogvbs/eslint-config/react"],
"rules": {
"import-helpers/order-imports": [
"warn",
{
"newlinesBetween": "always",
"groups": [...], // configure the import method
"alphabetize": { "order": "asc", "ignoreCase": true }
}
]
}
}