美文网首页
eslint忽略检错

eslint忽略检错

作者: 南慕瑶 | 来源:发表于2021-11-07 14:22 被阅读0次

1.忽略某一行的检错

在行末添加注释:

// eslint-disable-line [错误类型]

2.忽略某类检测(对eslint-disable后的代码,不再进行检测)

(1)忽略 no-undef 检测

/* eslint-disable no-undef */

(2)忽略 no-new 检测

/* eslint-disable no-new */

详情参照:

忽略某行报错:https://www.cnblogs.com/fiy-noob/p/9668625.html

忽略指定错误检测:https://blog.csdn.net/fifteen718/article/details/82759570

相关文章

网友评论

      本文标题:eslint忽略检错

      本文链接:https://www.haomeiwen.com/subject/jaecfctx.html