eslint-import-resolver-typescript icon indicating copy to clipboard operation
eslint-import-resolver-typescript copied to clipboard

Support for TS 5.5 ${configDir} syntax

Open ondrejvelisek opened this issue 1 year ago • 1 comments

Hi,

I'm just setting up a new monorepo project based on TS 5.5. It seems eslint-import-resolver-typescript does not support its new syntax.

// This tsconfig.json works

{
    "compilerOptions": {
        "baseUrl": "./src",
        "paths": {
            "#/*": ["./*"]
        }
    },
    "include": ["src/**/*"]
}

// This tsconfig.json does not work

{
    "compilerOptions": {
        "baseUrl": "${configDir}/src",
        "paths": {
            "#/*": ["./*"]
        }
    },
    "include": ["src/**/*"]
}

Specifically in

// MyComponent.tsx

import { AttributeFilter } from "#/components/AttributeFilter";
...

Throws:

Unable to resolve path to module '#/components/AttributeFilter'. eslint (import/no-unresolved)

Using version "eslint-import-resolver-typescript": "^3.6.1".

It also seems this package does not support paths without baseUrl (introduced in TS 4.1)

Is it possible truth? Do you plan to add? May I help somehow?

Thanks!

ondrejvelisek avatar Jul 11 '24 07:07 ondrejvelisek