speedskater / babel-plugin-rewire

A babel plugin adding the ability to rewire module dependencies. This enables to mock modules for testing purposes.
843 stars 90 forks source link

eslint no-undef rule considers __rewire_reset_all__ as invalid undefined symbol #213

Closed hng0 closed 6 years ago

hng0 commented 6 years ago

I understand that __rewire_reset_all__ is injected globally but in my project eslint rule no-undef is yelling as it cannot find where the function is coming from. I have to add linter next line ignore in whenever I use the function. Does anyone know a better way to handle this?

hng0 commented 6 years ago

I've found out eslint global configuration https://eslint.org/docs/user-guide/configuring#specifying-globals that can ignore this.