No-undef ignore pattern

Is there a way to exclude certain patterns from no-undeferror. I tried 'no-undef': [2, { ignoreBuiltinGlobals: ['app'] }]where appis my global variable defined by webpack.defineplugin. If I disable this rule, there will be no errors.

I also tried pasting app: trueinto a globalssection.eslintrc.js

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

+4
source share
1 answer

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

Have you tried /*global app */?

More here

+1
source

Source: https://habr.com/ru/post/1689322/


All Articles