当前位置:网站首页>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'
}
边栏推荐
- Syntax basics (variables, input and output, expressions and sequential statements)
- word column notes
- 使用二维码传输文件的小工具 - QFileTrans 1.2.0.1
- Syntax basics (variables, input and output, expressions and sequential statements)
- 倒计时 2 天|云原生 Meetup 广州站,等你来!
- IJCAI2022 | DictBert: Pre-trained Language Models with Contrastive Learning for Dictionary Description Knowledge Augmentation
- [Solved] Unity Coroutine coroutine is not executed effectively
- Programmer's Tanabata Romantic Moment
- Physical backup issues caused by soft links
- Turn: Charles Handy: Who you are is more important than what you do
猜你喜欢

ASP.NET应用程序--Hello World

MRTK3开发Hololens应用-手势拖拽、旋转 、缩放物体实现

Data storage practice based on left-order traversal

Why did they choose to fall in love with AI?

21 Days Learning Challenge (2) Use of Graphical Device Trees

你要的七夕文案,已为您整理好!

Never put off till tomorrow what you can put - house lease management system based on the SSM

On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion

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

【滤波跟踪】基于matlab无迹卡尔曼滤波惯性导航+DVL组合导航【含Matlab源码 2019期】
随机推荐
Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
ASP.NET application--Hello World
Flink 1.15.1 Cluster Construction (StandaloneSession)
1527. Patients suffering from a disease
The problem of lack of dynamic library "libtinfo.so.5" in ksql application under UOS system
public static <T> List<T> asList(T... a) 原型是怎么回事?
Why did they choose to fall in love with AI?
mysql没法Execute 大拿们求解
腾讯云【Hiflow】新时代自动化工具
J9 Digital Currency: What is the creator economy of web3?
How OpenGL works
How to Add Category-Specific Widgets in WordPress
How to sort multiple fields and multiple values in sql statement
.NET Application -- Helloworld (C#)
沃谈小知识 |“远程透传”那点事儿
Use SuperMap iDesktopX data migration tool to migrate ArcGIS data
[Qixi Festival] Romantic Tanabata, code teaser.Turn love into a gorgeous three-dimensional scene and surprise her (him)!(send code)
Review 51 MCU
【Daily Training】1403. Minimum Subsequence in Non-Increasing Order
Why is the pca component not associated