Skip to content

Support for TS 5.5 ${configDir} syntax #299

Closed
@ondrejvelisek

Description

@ondrejvelisek

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions