eslint-plugin-node
eslint-plugin-node copied to clipboard
Respect tsconfig's "paths" alias configuration for "no-missing-import" rule?
We use node/no-missing-import in a typescript project, the configuration we are using now is:
node/no-missing-import: # recommended error
- error
- tryExtensions: # default does not include TypeScript or JSX
- ".js"
- ".jsx"
- ".json"
- ".mjs"
- ".node"
- ".ts"
- ".tsx"
Is there a way to let the rule respect our paths alias config in tsconfig.json?
"paths": {
"@api/*": [
"src/api/*"
],
}
I have the same problem. I can't use my tsconfig.json aliases. So i'm disabling the rule 😞
It's sad because I think it's an important rule, but I'm not willing to use relative paths since Ts uses alias for that.
We have an updated fork of this plugin over at eslint-community/eslint-plugin-n
If you have any issue, please raise it over there and we will do our best to help :)