当前位置:网站首页>You may use special comments to disable some warnings. 报错解决的三种方式
You may use special comments to disable some warnings. 报错解决的三种方式
2022-08-05 03:18:00 【颜值与实力并存源】
You may use special comments to disable (禁用) some warnings.报错解决
原因 ESLint 对语法的要求过于严格导致编译的时候报上图那些错误。
要知道,这并不是代码有异常,而是代码格式有问题,这些错误并不会影响代码的执行结果。
方式一
找到build目录下的webpack.base.conf.js文件,注释掉其中的与有关的eslint规则即可。
关闭编码规范检查,编辑webpack.base.conf.js,找到module节点下的rules节点,注释掉这一行:
// ...(config.dev.useEslint ? [createLintingRule()] : []),
方法二
当项目并不存在build文件夹,即不属于vue脚手架工程,那请到根目录下 config文件夹下的index.js文件,将useEslint属性设置为false。
module.exports = {
dev:{
useEslint:false
}
}
方式三
.eslintrc.js文件夹下module.export 添加rules规则
rules: {
'@typescript-eslint/no-unused-vars': 'off'
}
边栏推荐
- 语法基础(变量、输入输出、表达式与顺序语句)
- Tencent Cloud [Hiflow] New Era Automation Tool
- leetcode - symmetric binary tree
- How to transfer a single node of Youxuan database to a cluster
- 你要的七夕文案,已为您整理好!
- Countdown to 2 days|Cloud native Meetup Guangzhou Station, waiting for you!
- 队列题目:最近的请求次数
- MRTK3开发Hololens应用-手势拖拽、旋转 、缩放物体实现
- On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion
- Never put off till tomorrow what you can put - house lease management system based on the SSM
猜你喜欢
随机推荐
语法基础(变量、输入输出、表达式与顺序语句)
达梦8数据库导出导入
ffmpeg 枚举decoders, encoders 分析
1873. The special bonus calculation
How to sort multiple fields and multiple values in sql statement
1527. Patients suffering from a disease
运维监控系统之Open-Falcon
HDU 1114: Piggy-Bank ← The Complete Knapsack Problem
使用二维码传输文件的小工具 - QFileTrans 1.2.0.1
开源协议说明LGPL
21天学习挑战赛(2)图解设备树的使用
dmp(dump)转储文件
Matlab drawing 3
QT MV\MVC structure
The usage of try...catch and finally in js
QT MV\MVC结构
百日刷题计划 ———— DAY2
Syntax basics (variables, input and output, expressions and sequential statement completion)
北斗三号短报文终端露天矿山高边坡监测方案
Use SuperMap iDesktopX data migration tool to migrate ArcGIS data









