eslint is running but not showing any lint errors/warnings

江枫思渺然 提交于 2019-12-06 16:47:37

You'll need to install an extension for VSCode to show lint errrors in the editor. Otherwise you can run eslint from the terminal to see its output. I use tslint so I don't know which extension to use but https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint might be what you're looking for.

Derek Chadwell

I needed to

  1. install eslint-plugin-vue

  2. add the following to settings.json in vscode

    "eslint.validate": [
        {
          "language": "vue",
          "autoFix": true
        },
        {
          "language": "html",
          "autoFix": true
        },
        {
          "language": "javascript",
          "autoFix": true
        }
    
  3. and update .eslintrc to include

    "globals: "Vue" : true,"
    

    and

    "extends": [
        "eslint:recommended",
        "plugin:vue/recommended"
    ],
    

    in addition to

    "plugins": ["html"],
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!