Skip to content

Instantly share code, notes, and snippets.

@danielschmitz
Last active March 14, 2018 14:27
Show Gist options
  • Save danielschmitz/3f4c7913d827dcc0b2d04a54b9918c98 to your computer and use it in GitHub Desktop.
Save danielschmitz/3f4c7913d827dcc0b2d04a54b9918c98 to your computer and use it in GitHub Desktop.
Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli

Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli

Projeto:

npx vue-cli init webpack <nomedoprojeto>
cd <nomedoprojeto>
npm install

Extensões do VSCode:

  • Vue
  • Vue 2 Snippets
  • Vue Peek
  • Vetur
  • ESLint
  • Editorconfig for VSCode

Config básica no settings.json:

"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"eslint.autoFixOnSave": true,
"eslint.validate": [
    {
        "language": "vue",
        "autoFix": true
    },
    {
        "language": "html",
        "autoFix": true
    },
    {
        "language": "javascript",
        "autoFix": true
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment