import-js/eslint-plugin-import

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

開放

#666 建立於 2016年11月14日

 (20 則留言) (21 個反應) (0 位負責人)JavaScript (1,549 個分叉)batch import
bugenhancementhelp wantedpackage: resolver/webpack

倉庫指標

星標
 (5,940 顆星)
PR 合併指標
 (平均合併 138天 22小時) (30 天內合併 3 個 PR)

描述

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.

貢獻者指南