0
포함 할 webpack이있는 .coffee
파일이 있습니다. 난 아직이 같은 라인에 대한 import/no-unresolved
linting 오류를 얻을 수 있습니다,하지만 어떤 이유eslint webpack resolver가 작동하지 않습니다.
"settings": {
"import/parser": "babel-eslint",
"import/resolver": {
"webpack": { "config": "webpack.config.js" }
}
},
:
// 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
파일을 설정 한 :
import foo from './my-coffee-file'
여기에는 my-coffee-file.coffee
디렉토리가 있습니다.
무엇이 잘못 됐는지에 대한 아이디어가 있습니까?