Skip to content

Instantly share code, notes, and snippets.

@strickc
Last active June 2, 2019 17:20
Show Gist options
  • Save strickc/5bdd35f34d689c6c1525534341307870 to your computer and use it in GitHub Desktop.
Save strickc/5bdd35f34d689c6c1525534341307870 to your computer and use it in GitHub Desktop.
Configure VS Code for Vue.js component vue files for syntax highlighting and ESLint support within <script> tags
  1. Install ESLint VS Code extension

  2. Install Vue 2 Snippts VS Code extension

  3. Install eslint-plugin-html: npm install --save-dev eslint-plugin-html

  4. Add "plugins": ["html"] to eslintrc config file as per eslint-plugin-html instructions. Vue extension is enabled by default for the plugin.

  5. Open VS Code user settings and add vue to eslint.validate:

    "eslint.validate": [ "javascript", "javascriptreact", "vue" ]
    
  6. Restart VS Code, eslint should now be displaying lint errors within <script> tags

@JREAM
Copy link

JREAM commented Oct 21, 2018

Ah, thank you!

@web-jade
Copy link

good

@codehell
Copy link

codehell commented Jun 2, 2019

Great!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment