How to disable ESLint in vue-cli?

前端 未结 13 1011
灰色年华
灰色年华 2020-12-02 09:28

How do I go about disabling ESlint in project generated with vue-cli?

preLoaders: [
  {
    test: /\\.vue$/,
    loader: \'eslint\         


        
相关标签:
13条回答
  • 2020-12-02 10:15

    As of the current version (^3.0?) you can just set:

    useEslint: false,

    in config/index.js

    0 讨论(0)
  • 2020-12-02 10:16

    Set useEslint: false, in config/index.js

    see this image

    0 讨论(0)
  • 2020-12-02 10:16

    Go to .eslintrc.js and add this:

    dev: {
       useEslint: false
    },
    
    0 讨论(0)
  • 2020-12-02 10:18

    Go inside file "tslint.json" and exclude all files in linterOptions. Default settings only excludes folder node_modules. You may also set "strict": false, inside tsconfig.json

      "linterOptions": {
        "exclude": [
          "*/**"
        ]
      },
    

    instead of

      "linterOptions": {
        "exclude": [
          "node_modules/**"
        ]
      },
    
    0 讨论(0)
  • 2020-12-02 10:21

    in package.json change the build step:

    ...
    "scripts": {
        "build": "vue-cli-service build --skip-plugins @vue/cli-plugin-eslint",
        ...
    },
    
    0 讨论(0)
  • 2020-12-02 10:25

    There are some out-of-date answers here.

    Because vue-cli 3 is using a zero configuration approach, the way to disable it is to just uninstall the module:

    npm remove @vue/cli-plugin-eslint
    
    0 讨论(0)
提交回复
热议问题