import-js/eslint-plugin-import

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

Open

#666 创建于 2016年11月14日

在 GitHub 查看
 (20 评论) (21 反应) (0 负责人)JavaScript (4,946 star) (1,540 fork)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.

贡献者指南