当前位置:网站首页>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
- Data storage practice based on left-order traversal
- Tencent Cloud [Hiflow] New Era Automation Tool
- [Solved] Unity Coroutine coroutine is not executed effectively
- 语法基础(变量、输入输出、表达式与顺序语句)
- Thinking (88): Use protobuf custom options for multi-version management of data
- Hash table lookup (hash table)
- STM32 uses stm32cubemx LL library series tutorial
- 静态方法获取配置文件数据
- Distributed systems revisited: there will never be a perfect consistency scheme...
猜你喜欢

Why is the pca component not associated

Bubble Sort and Quick Sort

Simple description of linked list and simple implementation of code

Why did they choose to fall in love with AI?

【已解决】Unity Coroutinue 协程未有效执行的问题

Flink 1.15.1 Cluster Construction (StandaloneSession)

如何在WordPress中添加特定类别的小工具

Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors

Everyone in China said data, you need to focus on core characteristic is what?

On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion
随机推荐
AI+PROTAC | dx/tx completes $5 million seed round
基于生长的棋盘格角点检测方法
【七夕节】浪漫七夕,代码传情。将爱意变成绚烂的立体场景,给她(他)一个惊喜!(送代码)
大像素全景制作完成后,推广方式有哪些?
Matlab drawing 3
软链接引发的物理备份问题
通过模拟Vite一起深入其工作原理
undo problem
Linux下常见的开源数据库,你知道几个?
Open Source License Description LGPL
【软件测试】自动化测试之unittest框架
Hash table lookup (hash table)
QT: The Magical QVarient
语法基础(变量、输入输出、表达式与顺序语句)
Multithreading (2)
QStyle平台风格
The pit of std::string::find return value
The 22-07-31 weeks summary
沃谈小知识 |“远程透传”那点事儿
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals