Skip to content

TS project references only consider the first referenceΒ #417

@marbemac

Description

@marbemac

Not sure if this is better off in eslint-plugin-import-x or eslint-import-resolver-typescript πŸ€·β€β™‚οΈ.

It seems that only the first reference is being considered - at least when it comes to the import-x/no-unresolved rule.

I've created a simple reproduction here -> https://github.com/marbemac/eslint-ts-resolve-references-bug/blob/main/tsconfig.json

If you comment out https://github.com/marbemac/eslint-ts-resolve-references-bug/blob/main/tsconfig.json#L4-L6 then the lint errors in the worker folder will go away (but will now have errors in the app folder). The paths etc from the first reference are being used regardless of which file is being linted. I would expect it to operate like typescript, and use the worker tsconfig when linting matching files in the worker dir, and app.tsconfig when linting matching files in the app dir.

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