ESLint rules to achieve better code, using Airbnb styles rules.
The Natura ESLint configuration extends the Airbnb configuration. While Airbnb provides a decent style configuration it does not use all the available rules to help enhance code quality like the following ones among others:
This project helps achieve the good maintainability
need, offering a default lint for all Node.js projects.
To use this configuration install the package on your project using either npm or yarn:
npm i --save-dev '@naturacosmeticos/eslint-config-natura'
yarn add -D '@naturacosmeticos/eslint-config-natura'
We recommend you to install accepting only new patch releases (ex: ~2.0.0
), once new minor releases could add new rules that can broke your pipeline.
Add @naturacosmeticos/natura
to the eslint extends
option in the .eslintrc
file:
{
"env": {
"es6": true,
"mocha": true,
"node": true
},
"extends": ["@naturacosmeticos/natura"],
"parserOptions": {
"ecmaVersion": 2017
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src", "test"]
}
}
}
}
Airbnb-base is already included, no need to add it.
You can contribute submitting pull requests.
Run yarn
or if your use npm npm i
.