VUE:[eslint] Strings must use singlequote
1、一个简单暴力省事的方法,请点击vue左侧栏目的搜索图标
![VUE:[eslint] Strings must use singlequote](https://exp-picture.cdn.bcebos.com/a1780d1fceecd3d997227c7767995943050108ef.jpg)
2、在搜索框输入.eslintrc.js或者搜索改文件名的其中某一部分也行,只要能找到.eslintrc.js文件
![VUE:[eslint] Strings must use singlequote](https://exp-picture.cdn.bcebos.com/054056fe1e425d6b0289c79a11883913e9e500ef.jpg)
3、在.eslintrc.js添加如下配置信息,这是全局进行配置的方法,如果你不想全局处理,只想在当前code下进行处理的话,请查看方法二
![VUE:[eslint] Strings must use singlequote](https://exp-picture.cdn.bcebos.com/bf6e59704618dfdaf563b53589214f57925677ef.jpg)
1、一个万能方法,走到哪都不怕,就是在报错的JS文件中报错的代码上写上:/* eslint-disable */
![VUE:[eslint] Strings must use singlequote](https://exp-picture.cdn.bcebos.com/f9617afb960b31211e398a10dee983aee9d76def.jpg)
2、该方法写在当前文件的顶层即可实现在本文件中处理了[eslint] Strings must use singlequote. (quotes)
问题,一个有趣的地方是:只要添加/* eslint-disable */,本文件中在/* eslint-disable */
之后所有的代码只要存在[eslint] Strings must use singlequote. (quotes)都会被默认进行处理,如图所示,第一个框在/* eslint-disable */之前未被处理,其余两处在/* eslint-disable */之后均被处理
![VUE:[eslint] Strings must use singlequote](https://exp-picture.cdn.bcebos.com/332d496699cf0253063bad366b36e29146e85fef.jpg)
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:85
阅读量:62
阅读量:104
阅读量:25
阅读量:43