赞
踩
有时候我们在运行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.
You may use special comments to disable some warnings.的翻译是:你可以使用一些特殊的注释来禁用一些警告
警告信息是提示你可以使用:
// eslint-disable-next-line来标记下一行内容不被eslint检测
/* eslint-disable */ 来标记整个文件不被eslint检测
使用方法如下:
// 下一行eslint规则失效
// eslint-disable-next-line
console.log(add(1, 10));
解决方法:
出现这个提示的原因是因为我们使用了eslint语法检测工具(初学者不推荐使用,很容易让人崩溃的),如果我们不想出现上述提示,有两种解决方法:
eslint:recommended
。如图:Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。