eslint-config-leonardopn
This is a ESLint config for my personal projects based on eslint-config-rocketseat
Whats included?
- Standard config base;
- React plugin(Changed by me);
- React Hooks plugin;
- JSX a11y plugin;
- Prettier(changed by me);
Setup
- Install the dependencies
npm i -D eslint eslint-config-leonardopn
- Create a
.eslintrc.json
file extending the config:
{
"extends": "eslint-config-leonardopn/react"
}
You can also use a .eslintrc.js
instead of JSON if you prefer.
if you use VsCode prettier formatter
- (Optional) Create a
.prettierrc.js
file extending the config:
const prettier = require("eslint-config-leonardopn/prettier");
module.exports = prettier;
You can override the default prettier file, but update also the file .eslintrc.js for prevent incompatibility between rules Eslint.
Example:
const prettier = require("eslint-config-leonardopn/prettier");
module.exports = {
...prettier,
semi: false,
};
module.exports = {
extends: ["eslint-config-leonardopn/react"],
rules: {
"prettier/prettier": ["error", { semi: false }],
},
};
License
This ESlint config is licensed by MIT License - LICENSE for more details.