@somosyampi/eslint-config
Version:
Pacote de padronização de código padrão para os projetos Yampi usando Node.js
58 lines (44 loc) • 1.21 kB
Markdown
Install the package on your project
```bash
yarn add -D eslint \
eslint-plugin-import \
eslint-plugin-jest \
eslint-config-airbnb-base \
@somosyampi/eslint-config
```
Add the config on your `.eslintrc.json` file:
```json
"extends": "@somosyampi/eslint-config"
```
```json
"extends": "@somosyampi/eslint-config/vue"
```
```json
"extends": "@somosyampi/eslint-config/vue3"
```
```json
"extends": "@somosyampi/eslint-config/vue3-ts"
```
_<sup>1</sup> You need to install the package **eslint-plugin-vue** to use any of the Vue configurations (`yarn add -D eslint-plugin-vue`)_
## How to auto-format on save?
**VS Code**
Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
Add the following settings to your `.vscode/settings.json`:
```json
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.format.enable": true,
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
}
```