merkle-open/eslint-config

eslint plugin import fails to load with npm 2

ernscht opened this issue · 1 comments

I'm getting this error when using this config with node 4.x and matching npm version 2.x:

Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import'
Referenced from: @namics/eslint-config/configurations/es6-browser.js
Referenced from: <...>/.eslintrc.js
    at Function.Module._resolveFilename (module.js:325:15)

the flat structure of npm 3 seems to fix the problem
but i couldn't find a fix for npm 2

what to do?

  • drop support for node 4 completely?
  • drop support for npm 2
  • find a way to solve this
  • ...

Fixed by setting eslint and eslint-plugin-import as peerDependencies.
See release 2.1.0: https://github.com/namics/eslint-config-namics/releases/tag/2.1.0