Allow debugger; statements in certain files, using ESLint

后端 未结 5 939
故里飘歌
故里飘歌 2021-02-08 10:30

Say I want to use this rule:

https://eslint.org/docs/rules/no-debugger

however, I have about 15 files where I want to keep debugger; statements.

Is there

5条回答
  •  滥情空心
    2021-02-08 10:57

    You can do that like this:

    /* eslint-disable no-debugger */
    ... code that violates rule ...
    /* eslint-enable no-debugger */
    

提交回复
热议问题