import-js / import-js/eslint-plugin-import
Unable to resolve path with rootPathPrefix and no extension name.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description


.eslintrc.json
```json
{
"env": {
"browser": true,
"es6": true
},
"extends": "airbnb",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"import"
],
"rules": {},
"settings": {
"import/resolver": {
"node": {
"paths": [
"src"
],
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
},
"babel-plugin-root-import": {
"rootPathPrefix": "#",
"rootPathSuffix": "src"
}
}
}
}
```
I don't want to add extension name, and try my best to solve it. Finally, it's failed. I'm so confused and upset with it recently, someone can help me?
Contributor guide
Research direction
Start with the supplied .eslintrc.json and its import/resolver settings, then reproduce an extensionless import using the # rootPathPrefix. Trace how the resolver handles root-prefixed paths and compare that behavior with the configured extensions; done means the expected path resolves without an extension, or the limitation is clearly established and covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100