Vue报错-取消ESLint默认检测

  1. ESLint规则对vue的语法格式要求比较严格,默认在启动Vue会给出警告

  1. 但是不影响项目使用,如果不想看到这些警告,我们可以取消ESLint检查

  1. D:\项目名\renren-fast-vue\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
  // }
})
  1. 重启dev即可。

强迫症不再看着难受^^

npm warn ERESOLVE overriding peer dependency npm warn While resolving: eslint-loader@2.2.1 npm warn Found: eslint@7.15.0 npm warn node_modules/eslint npm warn dev eslint@"7.15.0" from the root project npm warn 4 more (@vue/cli-plugin-eslint, babel-eslint, ...) npm warn npm warn Could not resolve dependency: npm warn peer eslint@">= 1.6.0" from @vue/cli-plugin-eslint@4.4.6 npm warn node_modules/@vue/cli-plugin-eslint npm warn dev @vue/cli-plugin-eslint@"4.4.6" from the root project npm warn ERESOLVE overriding peer dependency npm warn While resolving: eslint-loader@2.2.1 npm warn Found: eslint@7.15.0 npm warn node_modules/eslint npm warn dev eslint@"7.15.0" from the root project npm warn 4 more (@vue/cli-plugin-eslint, babel-eslint, ...) npm warn npm warn Could not resolve dependency: npm warn peer eslint@">= 4.12.1" from babel-eslint@10.1.0 npm warn node_modules/babel-eslint npm warn dev babel-eslint@"10.1.0" from the root project npm warn ERESOLVE overriding peer dependency npm warn While resolving: eslint-loader@2.2.1 npm warn Found: eslint@7.15.0 npm warn node_modules/eslint npm warn dev eslint@"7.15.0" from the root project npm warn 4 more (@vue/cli-plugin-eslint, babel-eslint, ...) npm warn npm warn Could not resolve dependency: npm warn peer eslint@"^6.2.0 || ^7.0.0" from eslint-plugin-vue@7.2.0 npm warn node_modules/eslint-plugin-vue npm warn dev eslint-plugin-vue@"7.2.0" from the root project npm warn ERESOLVE overriding peer dependency npm warn While resolving: eslint-loader@2.2.1 npm warn Found: eslint@undefined npm warn node_modules/eslint npm warn dev eslint@"7.15.0" from the root project npm warn npm warn Could not resolve dependency: npm warn peer eslint@">=1.6.0 <7.0.0" from eslint-loader@2.2.1 npm warn node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader npm warn eslint-loader@"^2.2.1" from @vue/cli-plugin-eslint@4.4.6 npm warn node_modules/@vue/cli-plugin-eslint npm error code EPERM npm error syscall mkdir npm error
最新发布
03-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值