@somosyampi/eslint-config
v3.0.0
Published
Pacote de padronização de código padrão para os projetos Yampi usando Node.js
Downloads
75
Readme
@somosyampi/eslint-config
How to use
Install the package on your project
yarn add -D eslint \
eslint-plugin-import \
eslint-plugin-jest \
eslint-config-airbnb-base \
@somosyampi/eslint-config
Add the config on your .eslintrc
file:
JavaScript
"extends": "@somosyampi/eslint-config"
Vue.js 2 + JavaScript1
"extends": "@somosyampi/eslint-config/vue"
1 You need to install the package eslint-plugin-vue to use this configuration (yarn add -D eslint-plugin-vue
)
How to auto-format on save?
VS Code
Install VS Code ESLint extension
Add the following settings to your .vscode/settings.json
:
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.format.enable": true,
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
}