当前位置:网站首页>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'
}
边栏推荐
- Never put off till tomorrow what you can put - house lease management system based on the SSM
- 【滤波跟踪】基于matlab无迹卡尔曼滤波惯性导航+DVL组合导航【含Matlab源码 2019期】
- 用CH341A烧录外挂Flash (W25Q16JV)
- 2022.8.4-----leetcode.1403
- 链表的简单描述及代码的简单实现
- On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion
- Study Notes-----Left-biased Tree
- Review 51 MCU
- IJCAI2022 | DictBert: Pre-trained Language Models with Contrastive Learning for Dictionary Description Knowledge Augmentation
- QT MV\MVC结构
猜你喜欢

Beidou no. 3 short message terminal high slope in open-pit mine monitoring programme

Question about #sql shell#, how to solve it?

Data to enhance Mixup principle and code reading

ASP.NET应用程序--Hello World

Flink 1.15.1 Cluster Construction (StandaloneSession)

YYGH-13-客服中心

2022-08-04 The sixth group, hidden from spring, study notes

Use SuperMap iDesktopX data migration tool to migrate ArcGIS data

引领数字医学高地,中山医院探索打造未来医院“新范式”

Simple description of linked list and simple implementation of code
随机推荐
QT language file production
2022高处安装、维护、拆除考试题模拟考试题库及在线模拟考试
On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion
1527. Patients suffering from a disease
十五. 实战——mysql建库建表 字符集 和 排序规则
Never put off till tomorrow what you can put - house lease management system based on the SSM
论治理与创新,2022 开放原子全球开源峰会 OpenAnolis 分论坛圆满落幕
Chinese characters to Pinyin
腾讯云【Hiflow】新时代自动化工具
链表的简单描述及代码的简单实现
Cybersecurity and the Metaverse: Identifying Weak Links
Object.defineProperty monitors data changes in real time and updates the page
ffmpeg 像素格式基础知识
J9 Digital Currency: What is the creator economy of web3?
通过模拟Vite一起深入其工作原理
ASP.NET应用程序--Hello World
Summary of domestic environments supported by SuperMap
高项 02 信息系统项目管理基础
burp安装及代理设置
private封装