允许调试器;使用ESLint在某些文件中的语句 [英] Allow debugger; statements in certain files, using ESLint
本文介绍了允许调试器;使用ESLint在某些文件中的语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
说我要使用此规则:
https://eslint.org/docs/rules/no-debugger
但是,我有大约15个文件要保留调试器.声明.
however, I have about 15 files where I want to keep debugger; statements.
我可以在.ts/.js文件的顶部添加一些内容,以使ESLint忽略此特定文件的 no-debugger
规则吗?
Is there something I can add at the top of the .ts/.js files, that can tell ESLint to ignore the no-debugger
rule for this particular file?
推荐答案
您还可以在同一行中禁用ESLint:
You can also disable ESLint in the same line:
debugger; // eslint-disable-line no-debugger
这篇关于允许调试器;使用ESLint在某些文件中的语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文