- printWidth: 100
- tabWidth: 2
- singleQuote: false
- trailingComma: 'all'
- arrowParens: 'always'
- semi: true
- If you use VSCode: Install eslint extension
- Install the dependencies
npm i -D eslint @gitirana/eslint-config
- Add this code to your settings.json
If you use WSL, add the code on te Remote Settings
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
},
- Create a
.eslintrc.json
file extending the config:
{
"extends": "@gitirana/eslint-config/react"
}
{
"extends": "@gitirana/eslint-config/node"
}
You can also use a
.eslintrc.js
instead of JSON if you prefer.