有了eslint的校验,可以来规范开发人员的代码,是挺好的。但是有些像缩进、空格、空白行之类的规范,但是稍有不符合,就会在开发过程中一直报错,太影响心情和效率了。所以,还是会选择关闭eslint校验。

在build/webpack.base.conf.js文件中,注释或者删除掉:module->rules中有关eslint的规则

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

vue-cli 3 中精简了,相比 vue-cli 2.X 创建的目录,vue-cli 3.0 创建的目录看不见 webpack 的配置。

.

Use /* eslint-disable */ to ignore all warnings in a file. 报错的更多相关文章

  1. vue——解决“You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file. ”

    在build/webpack.base.conf.js文件中,注释或者删除掉:module->rules中有关eslint的规则 module: { rules: [ //...(config. ...

  2. Vue —— You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.问题

    方法1: 在build/webpack.base.conf.js文件中,找到module->rules中有关eslint的规则,注释或者删除掉就可以了 module: { rules: [ // ...

  3. Vue踩坑日记-You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.

    记录时间:2019年4月24日16:55:54 在build/webpack.base.conf.js文件中,注释或者删除掉:module->rules中有关eslint的规则

  4. vue启动问题(You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.)

    解决vue启动出现: 在build/webpack.base.conf.js文件中,把...(config.dev.useEslint ? [createLintingRule()] : [])注释或 ...

  5. Vue运行报错--eslint

    Errors:? 1? http://eslint.org/docs/rules/no-trailing-spacesYou may use special comments to disable s ...

  6. RabbitMQ>Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as OnFail is set to ignore.-报错解决方案 原来是NNND。。。

    >Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as ...

  7. ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE

    ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE 打开 /app/base/lib/application/dbtable.php , 替换A ...

  8. eslint 代码缩进 报错及解决

    一.背景 使用vue在VScode中正常写的代码,报了一堆的错误,仔细检查,发现都是缩进要么多了要么少了,总之是代码不规范的的报错. 二.原因 百度查了发现代码规范默认缩进2个空格,而VScode默认 ...

  9. Vue常见问题解决办法(一)ESLint检查报错

    vue.js报错“Do not use 'new' for side effects“(main.js里)解决办法 ESLint工具检查代码质量,main.js里的原代码是这样的: new Vue({ ...

随机推荐

  1. 经典算法(六) simhash

    参考文档: simhash算法原理及实现:https://blog.csdn.net/chenguolinblog/article/details/50830948

  2. ReentrantLock源码简析

    概念 ReentrantLock,可重入锁.在多线程中,可以通过加锁保证线程安全. 加锁和解锁 加锁: public void lock() { sync.lock(); } 解锁 public vo ...

  3. redis为何单线程 效率还这么高 为何使用跳表不使用B+树做索引(阿里)

    如果想了解 redis 与Memcache的区别参考:Redis和Memcache的区别总结 阿里的面试官问问我为何redis 使用跳表做索引,却不是用B+树做索引 因为B+树的原理是 叶子节点存储数 ...

  4. prometheus安装(docker)

    参考:https://github.com/songjiayang/prometheus_practice https://github.com/kjanshair/docker-prometheus ...

  5. 使用MobaXterm配置ssh隧道(port forwarding)

    背景描述:如图所示,本地与远程服务器之间存在防火墙,防火墙只允许SSH端口通过,为访问远程服务器,我们可以借助MobaXterm来与SSH服务器建立隧道,使得防火墙外的用户能够访问远程服务器 具体配置 ...

  6. C# Process.Start()函数打开url被360拦截问题

    使用Process.Start(new ProcessStartInfo(url))来打开某一网址的时候,往往会被360提示 类似这样的 信息: “威胁:修改此注册表项将更改IE连接设置.少数软件会修 ...

  7. zabbix 搭建 mysql 连接报错

    如图所示: 查看 MySQL的配置文件 [root@zbxtest ~]# cat /etc/my.cnf [mysqld] datadir=/data/mysql socket=/data/mysq ...

  8. 整合去除HTML 标签, 去除开头结尾换行,将连续空格合并为一个

    文本是从编辑器中读取数据,有的时候,可能不需要显示格式这个时候需要去除HTML 标签,只引入其中的文本 //去掉html标签 function removeHtmlTab(tab) { return ...

  9. linux ------ 在Vm 安装 centos系统

    -------------   简介 熟悉的操作系统*(android apple windows) 主要分类 1.应用领域(桌面.服务器.嵌入式) 2.源码开放程度(开源.闭源) 3.所支持的用户数 ...

  10. react加入websocket

    1.首先创建一个公共的组件,封装websocket 代码如下 /** * 参数:[socketOpen|socketClose|socketMessage|socketError] = func,[s ...