Skip to content

import/no-unresolved if tsconfig from references is extended #400

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

Open
nikitayutanov opened this issue Mar 20, 2025 · 1 comment
Open

import/no-unresolved if tsconfig from references is extended #400

nikitayutanov opened this issue Mar 20, 2025 · 1 comment

Comments

@nikitayutanov
Copy link

nikitayutanov commented Mar 20, 2025

The 4.x release was intended to rework tsconfig with specified references. Everything works as expected unless one of the referenced configs extends another config.

Reproduction

Here’s a repository with a quick reproduction of the issue. The main tsconfig.json references both tsconfig.app.json and tsconfig.node.json.

However, since tsconfig.app.json extends tsconfig.base.json, running the eslint CLI results in an import/no-unresolved error.

This issue persists unless multiple projects are explicitly specified in eslint.config.js.

Real-World Use Case

While this may seem redundant, a real-world scenario would involve tsconfig.app.json extending a config provided by an external package rather than a locally defined one. For example:

{
  "extends": "@tsconfig/recommended/tsconfig.json"
}

This is particularly useful because it is currently not possible to inherit a single main config when using references.


Is this the intended behavior? It seems there are differences in how extended tsconfig files are handled when specified in the main config references.

Feel free to let me know if you need further adjustments, and thanks for your efforts!

@JounQin
Copy link
Collaborator

JounQin commented Mar 20, 2025

cc @Boshen

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