给出以下文件:
module/
- module.js
如果我这样做import Module from ./module
,它可以在javascript中工作(命名目录导入),但是EsLint失败并打印:
Unable to resolve path to module './module'.eslint(import/no-unresolved)
这是我对babel和eslint的配置:
"eslintConfig": {
"extends": [
"react-app",
"airbnb"
],
"settings": {
"import/resolver": "webpack"
}
},
"babel": {
"presets": [
"flow",
"react-app"
]
}
您知道我应该为EsLint激活哪个规则来解决此问题吗?