eslint忽略检错

2021-11-07  本文已影响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

上一篇 下一篇

猜你喜欢

热点阅读