Open ipanasenko opened 5 months ago
Within the monorepo setting include biome.json
at the root of your monorepo. Third-party tools cannot into multi-root setups like monorepos and cannot read multiple biome config files.
It sucks, especially if you use different configs for different projects within the monorepo, but so far it is the least problematic setup.
I have single biome.json
and it's is in the repo root. I don't have Biome configuration issue, it just reports things differently in IDE/precommit hook and from CLI
I think this is because the root directory detection (cwd
) has different results in CLI, LSP and git hooks. I will look into this issue.
I did some debugging but couldn't find time to implement the fix, others are welcome to tackle it. Here is what I found:
For me, it fails to detect dependencies in a pnpm monorepo workspace even from CLI. It also errors out in VsCode.
Environment information
Rule name
noUndeclaredDependencies
Playground link
not applicable
Expected result
I don't really know what additional info to provide. I will try to create a reproducible repo, but for now this all I have.
Note that this is a monorepo. Dependencies are declared NOT in root
package.json
file.When running
npx biome check
I see no errors. But at the same time WebStorm and VSCode highlight imports as errors, and I see the same error during precommit hook.npx biome check
:git commit
:WebStorm:
Let me know if I need to provide more info, thank you!
Code of Conduct