No-undef ignore pattern

Viewed 4476

Is there any way to exclude specific patterns from no-undef error. I tried 'no-undef': [2, { ignoreBuiltinGlobals: ['app'] }] where app is my global variable defined by webpack.defineplugin. If I switch this rule off - no errors appear.

I also tried to insert app: true in globals section of .eslintrc.js

Or another way to get my variable 'def' without errors

1 Answers

I understand that you want eslint to ignore the app global variable.

Did you try /*global app */?

More info here

Related