Skip to content

fix: opening individual modules in monorepo #207

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
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

arnold095
Copy link

This PR fixes two related regressions in the IntelliJ Biome plugin’s configuration resolution logic (see issue #201):

Restore upward search to the project root

Problem (v1.7.2): findNearestFile no longer included the specified root directory in its upward traversal, causing the LSP server not to start when opening only a submodule.

Solution: Adjusted the loop in findNearestFile so that it continues searching until it reaches the root (if provided) or the filesystem root, and includes root in the search.

Allow submodule configs in findNearestBiomeConfig

Problem (v1.9.0): After PR #196, findNearestBiomeConfig filtered out any biome.json that wasn’t marked as a “root” config, even when opening a single submodule, so local configs were ignored.

Solution: Updated the predicate to skip the isRootConfig() check whenever a root directory is supplied—i.e. when operating in submodule mode, the first biome.json found is accepted regardless of its root flag or extends setting. In full-monorepo mode (root == null), the original isRootConfig() requirement remains.

@arnold095 arnold095 changed the title Fix: opening individual modules in monorepo fix: opening individual modules in monorepo Jul 30, 2025
Comment on lines +39 to +40
// 2. If called with a 'root' (submodule), accept the first one found
if (root != null) return@findNearestFile true
Copy link
Member

@siketyan siketyan Aug 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't correct, root is always NOT null unless we can't find the project root. This changes breaks the new-style monorepo support and launches a Biome instance for each package. I think we should use the child config only when we have searched to the project root and no root config was found.

image

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

Successfully merging this pull request may close these issues.

2 participants