vue3关闭语法检查(实测有效)

vue3关闭语法检查(实测有效)

第一种方式

新建vue.config.js文件在文件中输入一下代码

module.exports = {
    
    
    // 关闭eslint校验
    devServer: {
    
    
        overlay: {
    
    
            warnings: true,
            errors: true
        }
    },
    lintOnSave: false
}

但是这种方式我试过好像没生效!

亲测有效方式

将.eslintrc.js 文件中的 '@vue/standard’注释掉即可

module.exports = {
    
    
  root: true,
  env: {
    
    
    node: true
  },
  extends: [
    'plugin:vue/vue3-essential',
    // '@vue/standard',
    '@vue/typescript/recommended'
  ],
  parserOptions: {
    
    
    ecmaVersion: 2020
  },
  rules: {
    
    
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'vue/multi-word-component-names': 'off'
  }
}

猜你喜欢

转载自blog.csdn.net/u011616265/article/details/127507523