import-js/eslint-plugin-import

Webpack resolver looks for custom webpack config in packages with jsnext:main

Open

#666 opened on 2016年11月14日

GitHub で見る
 (20 comments) (21 reactions) (0 assignees)JavaScript (4,946 stars) (1,540 forks)batch import
bugenhancementhelp wantedpackage: resolver/webpack

説明

With a .eslintrc like

"settings": {
  "import/resolver": {
    "webpack": {
      "config": "webpack.karma.config.js"
    }
  }
},

when I import

import {takeEvery} from 'redux-saga';

I get the error

 Cannot find module '/path/to/project/node_modules/redux-saga/webpack.karma.config.js

When I remove the jsnext:main entry from the package.json inside node_modules/redux-saga, the error goes away. So I guess the plugin is somehow trying to find a Webpack config inside redux-saga to load resolve configuration for ES6 files? This might be fine, looking for my custom Webpack config does not make sense, though.

コントリビューターガイド