报错You may use special comments to disable some warnings.vue-cli脚手架关闭eslint的步骤

简介: 报错You may use special comments to disable some warnings.vue-cli脚手架关闭eslint的步骤

打开 build文件夹下面的webpack.base.conf.js;

找到下面这段代码,并将它注释掉:

const createLintingRule = () => ({
  // test: /\.(js|vue)$/,
  // loader: 'eslint-loader',
  // enforce: 'pre',
  // include: [resolve('src'), resolve('test')],
  // options: {
  //   formatter: require('eslint-friendly-formatter'),
  //   emitWarning: !config.dev.showEslintErrorsInOverlay
  // }
})

重启项目,正常情况下这样就可以解决了。

________________________

如果以上办法还不能解决,就看下面的方法:

在build文件夹下面的webpack.base.conf.js中找到

注释掉上面43行代码即可

  module: {
    rules: [
      // ...(config.dev.useEslint ? [createLintingRule()] : []),
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: vueLoaderConfig
      },


相关文章
|
25天前
|
JavaScript 内存技术
Vue 安装vue-element-admin启动报错error:0308010C:digital envelope routines::unsupported
Vue 安装vue-element-admin启动报错error:0308010C:digital envelope routines::unsupported
|
10月前
|
JavaScript
vue报错: ERROR ~/.vuerc may be outdated. Please delete it and re-run vue-cli in manual mode.
vue报错: ERROR ~/.vuerc may be outdated. Please delete it and re-run vue-cli in manual mode.
111 0
vue报错: ERROR ~/.vuerc may be outdated. Please delete it and re-run vue-cli in manual mode.
|
5月前
|
JavaScript
Vue:You may use special comments to disable some warnings.
Vue:You may use special comments to disable some warnings.
|
5月前
|
JavaScript
Vue报错:3 errors and 0 warnings potentially fixable with the `--fix` option.
Vue报错:3 errors and 0 warnings potentially fixable with the `--fix` option.
|
6月前
vue-element-admin项目关闭eslint校验
vue-element-admin项目关闭eslint校验
34 0
|
9月前
|
JavaScript
vue create 报pnpm错误原因和解决方案
vue create 报pnpm错误原因和解决方案
292 0
|
10月前
|
JavaScript
vue.js实战案例(3):vue启动项目报错npm ERR! missing script: serve的解决方法
vue.js实战案例(3):vue启动项目报错npm ERR! missing script: serve的解决方法
289 0
npm install报错peerDependencies WARNING eslint-plugin-vue@^5.2.3 requires a peer of eslint@^5.0.0 but
npm install 报错,以为是npm问题,改成cnpm install,也还是报错,根据错误信息提示,推断是eslint版本不兼容。
571 0
|
缓存 JavaScript
Vue中的options选项
Vue中的options选项
Nuxt.js框架启动报错: 35 errors, 0 warnings potentially fixable with the `--fix` option.
Nuxt.js框架启动报错: 35 errors, 0 warnings potentially fixable with the `--fix` option.
Nuxt.js框架启动报错: 35 errors, 0 warnings potentially fixable with the `--fix` option.