I have this problem with ESLint and can't soulve on my own, those stores are separated for each enviroement as you can see on the screenshot, how could I fix that to make ESLint happy and I to learn a new thing?
If you need to require() an optional dependency inside of a try / catch , you can disable this rule for just that dependency using the // eslint-disable-line global-require comment.
If you want to disable an ESLint rule in a file or on a specific line, you can add a comment. On a single line: const message = 'foo'; console. log(message); // eslint-disable-line no-console // eslint-disable-next-line no-console console.
It's because you're requiring in branched code: http://eslint.org/docs/rules/global-require.
If you don't want to change your code, just add disabling comments:
/* eslint-disable global-require */ // your code here /* eslint-enable global-require */
You can disable it in your .eslintrc file.
{ rules: { "global-require": 0 } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With