Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for TS 5.5 ${configDir} syntax #299

Open
ondrejvelisek opened this issue Jul 11, 2024 · 1 comment
Open

Support for TS 5.5 ${configDir} syntax #299

ondrejvelisek opened this issue Jul 11, 2024 · 1 comment

Comments

@ondrejvelisek
Copy link

ondrejvelisek commented Jul 11, 2024

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!

@SukkaW
Copy link
Collaborator

SukkaW commented Jul 18, 2024

See also privatenumber/get-tsconfig#81

eslint-import-resolver-typescript's baseUrl and paths support is powered by get-tsconfig. I will bump the version of get-tsconfig ASAP once it is implemented and released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants