Open
Description
I am trying to supply eslint-import-resolver-typescript
with custom extensionAlias
option. Is this the correct way:
{
"plugins": ["import"],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "./tsconfig.json",
"extensionAlias": {
".js": [ ".ts", ".d.ts", ".js" ],
".cjs": [ ".cts", ".d.cts", ".cjs" ],
".mjs": [ ".mts", ".d.mts", ".mjs" ],
".ts": [ ".js", ".d.ts", ".ts" ],
".cts": [ ".cjs", ".d.cts", ".cts" ],
".mts": [ ".mjs", ".d.mts", ".mts" ],
}
}
}
},
"rules": {
"import/extensions": [
"error"
"always",
{
"ignorePackages": false
}
]
}
}
bc it doesn't seem to work...
What am i trying to achieve?
I am trying to fix Missing file extension "ts" for [...]
linting error from import/extensions
rule by trying to "teach" eslint-import-resolver-typescript
resolver to treat ".js" as aliases for ".ts" extension.
Metadata
Metadata
Assignees
Labels
No labels