UNPKG

@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
# @somosyampi/eslint-config ## How to use 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: ### JavaScript ```json "extends": "@somosyampi/eslint-config" ``` ### Vue.js 2 + JavaScript<sup>1</sup> ```json "extends": "@somosyampi/eslint-config/vue" ``` ### Vue.js 3 + JavaScript<sup>1</sup> ```json "extends": "@somosyampi/eslint-config/vue3" ``` ### Vue.js 3 + TypeScript<sup>1</sup> ```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" }, } ```