How to tell JSHint to ignore all undefined variables in one file?

前端 未结 4 1853
名媛妹妹
名媛妹妹 2021-02-05 01:27

In Karma tests, there are a lot of global variables and functions, which JSHint complains about (it is integrated into my editor).

How can I tell JSHint to ignore all u

4条回答
  •  逝去的感伤
    2021-02-05 02:11

    Just add this rule in your .jshintrc file.

    "-W117": true
    

    This will ignore all the warnings which say, '* is not defined.'

提交回复
热议问题