Closed odedniv closed 6 years ago
Sorry, eslint
is not a dev dependency in our case. Since we're rewriting const
to let
, we need to check first that const
are not re-assigned.
Why is that a problem for you? If you're using ESLint in your project, wouldn't it make more sense to have it as a dev dependency in your application (assuming you're calling it via npm scripts)?
I did that eventually, it does make more sense to install eslint locally.
The problem was that I had configured eslint globally, including a plugin that was also installed globally. Because rewire had eslint installed locally my editor and package.json scripts used it instead, and the locally installed eslint wouldn't load the globally installed plugin which made my global configuration invalid (eslint crashed for missing plugin).
Thanks though
You can achieve the same with a simple .eslintrc
file, instead of having it in your code, right?
I have the same issue as @odedniv as I am using babel 7
and eslint v4 is loaded with babel 6
Having eslint as a dependencies causes my project to pull eslint to the project's
node_modules
, which overrides my globally installed eslint.Since eslint is only required for developing rewire and is not required for rewire to function, it should be moved to devDependencies.
Thanks!