0
webpackに含めるように設定したファイルがあります。.coffee
があります。eslint webpackリゾルバが動作しない
// inside `webpack.config.js`...
resolve: {
// tell webpack which extensions to auto search when it resolves modules. With this,
// you'll be able to do `require('./utils')` instead of `require('./utils.js')`
extensions: ['', '.js', '.coffee', '.jsx'],
// by default, webpack will search in `web_modules` and `node_modules`. Because we're using
// Bower, we want it to look in there too
modulesDirectories: ['node_modules', 'bower_components'],
alias: {
'jquery.ui.widget': 'jquery-ui/ui/widget.js',
'jquery-ui/widget': 'jquery-ui/ui/widget.js',
'jquery-ui-css': 'jquery-ui/../../themes/base'
}
},
私はeslint-import-resolver-webpack
私のプロジェクトにインストールされ、そして私の.eslintrc.json
ファイルでそれを設定している:何らかの理由で
"settings": {
"import/parser": "babel-eslint",
"import/resolver": {
"webpack": { "config": "webpack.config.js" }
}
},
しかし、私はまだこのようなラインのimport/no-unresolved
リンティングエラーを取得します:
import foo from './my-coffee-file'
ここにディレクトリ内にmy-coffee-file.coffee
があります。
何が問題になっているかについてのアイデアはありますか?