ESLint ES6 Redux global-required Unexpected require();

Pedro Costa Neves picture Pedro Costa Neves · May 27, 2016 · Viewed 20k times · Source

enter image description here

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?

Answer

Lee picture Lee · May 27, 2016

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 */