错误描述:项目启动时,出现

You may use special comments to disable some warnings.的翻译是:你可以使用一些特殊的注释来禁用一些警告

出现这样的问题是:ESLint 对语法的要求过于严格,出现这样的问题并不是写的代码有异常,是代码的格式有问题

解决办法:取消ESLint验证规则

方法1: 关闭eslint语法检测,在.eslintrc.js文件中,注释掉 eslint:recommended

方法2:如果你的项目是vue脚手架工程,那么找到项目根目录下的bulid文件夹下的 webpack.base.conf.js,找到以下代码块并注释掉第三行代码

 module: {rules: [...(config.dev.useEslint ? [createLintingRule()] : []),  //注释掉该行代码{test: /\.vue$/,loader: 'vue-loader',options: vueLoaderConfig},

注释完保存退出,重新启动项目即可。

方法3:当项目并不存在build文件夹,即不属于vue脚手架工程,那请到根目录下 config文件夹下的index.js文件,将useEslint属性设置为false。

之后重新启动项目即可。

方法4:如果是vue3新项目的话,找不到上面的文件,找到vue.config.js把vue.config.js中的lintOnSave的值改为false即可。但如果在vue.config.js中没有lintOnSave则添加

lintOnSave: false

module.exports = defineConfig({transpileDependencies: true,lintOnSave: false
})

中。然后重新启动就行。

遇到问题简单记录一下,我是通过第四种方法解决了问题。

vue解决:You may use special comments to disable some warnings.Use // eslint-disable-next-line to ign相关推荐

  1. vue解决----You may use special comments to disable some warnings.Use // eslint-disable-next-line to i

    虽然知道是ESLint 对语法的要求过于严格导致编译的时候报错,需要改掉eslint, 但是在网上查到的方法都不管用,耗费了两个小时,终于在一个帖子里找到了方法,因此总结如下: 完整警告: 找到的方法 ...

  2. Vue:You may use special comments to disable some warnings.

    Vue:You may use special comments to disable some warnings. 报错如下: 解决办法: 找到build下webpack.base.conf.js ...

  3. You may use special comments to disable some warnings. 报错解决的三种方式

    You may use special comments to disable (禁用) some warnings.报错解决 原因 ESLint 对语法的要求过于严格导致编译的时候报上图那些错误. ...

  4. You may use special comments to disable some warnings.报错解决

    You may use special comments to disable some warnings.报错解决 一.错误信息 You may use special comments to di ...

  5. VUE启动报这个错误:You may use special comments to disable some warnings.

    问题描述: 在vue启动时报了如下错误: You may use special comments to disable some warnings. Use // eslint-disable-ne ...

  6. VUE3 You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignor

    今天学习vue3建项目的时候遇到Eslint各种报错, 报错一: 8:1 error Delete `⏎` prettier/prettier ✖ 1 problem (1 error, 0 warn ...

  7. You may use special comments to disable some warnings. Use // eslint-disable-next-line……

    You may use special comments to disable some warnings. Use // eslint-disable-next-line-- 错误如下 解决办法 在 ...

  8. vue解决启动报错cjs loader.js Error: Cannot find module ‘../config‘问题

    vue解决启动报错cjs loader.js Error: Cannot find module '../config'问题 参考文章: (1)vue解决启动报错cjs loader.js Error ...

  9. table中加表单元素怎么验证_使用element-ui +Vue 解决 table 里包含表单验证的问题...

    应用场景: 在实际使用中经常会遇到需要在Form表单中使用table表格进行表单提交,同时又需要对table的字段进行校验,效果如图所示: 这个校验中,最关键的问题在于如何给el-form-item ...

最新文章

  1. 使用JSP/SERVLET实现在校学生管理系统
  2. Linux 文件系统概述
  3. python3.7安装wordcloud_Python中的wordcloud库安装问题及解决方法
  4. RocketMQ安装内存不足的问题
  5. Code Chef December Challenge 2018题解
  6. 缺失值填充1——缺失值查看、确定值填充、参考值填充
  7. intellisense_SQL Server IntelliSense的使用和故障排除–适用于SQL Server 2012或更高版本
  8. mysql支持数据安全的引擎_2、MySQL常见数据库引擎及比较?
  9. Mac源码安装使用OpenCV
  10. 人脸检测-MTCNN算法笔记和代码解读
  11. 想知道ios系统还有哪些比较好用的思维导图软件?
  12. C语言——自动关机小程序
  13. 一个月的java工作总结
  14. 上计算机课没有签到肿么办,钉钉教学直播如何课前签到 钉钉直播如何提醒未签到的学生...
  15. Office2013 及 WPS 设置护眼文档颜色方法
  16. npm学习(十七)之node_modules中的bin文件夹
  17. 细胞衰老——酪氨酸激酶抑制剂
  18. MySQL 导入、备份
  19. 教你解决主板过热导致的频繁死机
  20. jmeter压力测试报告

热门文章

  1. 一文详解数据库“游标”
  2. 全国驻京办事处地址电话美食查询
  3. TCP长连接实践与挑战
  4. 网络编程_常用的基本函数介绍——htonl、ntohl、htons、ntohs
  5. 限流之滑动窗口算法实战
  6. 【6G 新技术】6G数据面介绍
  7. python测颜值(优良中差不及格)?敢不敢来一发
  8. 西安科大计算机专业排名,全国计算机专业大学排名(最新)
  9. matlab导入表格警告
  10. Build your own React_8 Hooks