Skip to content

docs: clarify plugin path resolution for extended configs#4012

Open
soconnor-seeq wants to merge 1 commit intobiomejs:nextfrom
soconnor-seeq:docs/extended-plugin-paths
Open

docs: clarify plugin path resolution for extended configs#4012
soconnor-seeq wants to merge 1 commit intobiomejs:nextfrom
soconnor-seeq:docs/extended-plugin-paths

Conversation

@soconnor-seeq
Copy link

@soconnor-seeq soconnor-seeq commented Feb 25, 2026

Note

I had Codex help me understand the existing documentation and where documentation w.r..t plugins, file path resolution, etc are.

Summary

Document plugin path resolution for extended configs, including the ./ and ../ exception.

Context

Docs for biomejs/biome#9233.

@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit e87b76b
🔍 Latest deploy log https://app.netlify.com/projects/biomejs/deploys/699f4033b8716300086768fd
😎 Deploy Preview https://deploy-preview-4012--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Walkthrough

This pull request updates documentation across four files to clarify how plugin paths are resolved in Biome's configuration system. The changes introduce and explain a key rule: when a configuration file extends another, relative paths resolve relative to the extending config, with a specific exception for plugin entries starting with ./ or ../, which are resolved relative to the configuration file where they are declared. New examples and error illustrations are included to illustrate plugin path resolution behaviour.

Suggested reviewers

  • dyc3
  • arendjr
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarises the main change: documentation updates clarifying plugin path resolution behaviour for extended configuration files.
Description check ✅ Passed The pull request description clearly relates to the changeset, documenting plugin path resolution for extended configs across multiple documentation files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/content/docs/linter/plugins.mdx`:
- Around line 39-41: The phrase "entry configuration file" is ambiguous in the
third bullet describing extends resolution; update that bullet to explicitly say
it means "the configuration file that contains the extends property (i.e., the
file doing the extending/declaring)", not the top-level extended config.
Concretely, change the bullet text that currently reads "Other strings are
treated as paths relative to the entry configuration file" to something like
"Other strings are treated as paths relative to the configuration file that
declares the extends value (the file doing the extending)", and ensure this
clarification sits alongside the existing mention of `extends`/scoped package
specifiers to remove ambiguity.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7694d2 and e87b76b.

📒 Files selected for processing (4)
  • src/content/docs/guides/big-projects.mdx
  • src/content/docs/guides/configure-biome.mdx
  • src/content/docs/linter/plugins.mdx
  • src/content/docs/reference/configuration.mdx

Comment on lines +39 to +41
- Scoped package specifiers (starting with `@`) are resolved via
`package.json` resolution (for example, from `node_modules` or workspaces).
- Other strings are treated as paths relative to the entry configuration file.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify "entry configuration file" in the third bullet.

"Entry configuration file" is not a defined term in the Biome docs, and in the context of extends it's genuinely ambiguous — a reader could interpret it as either the declaring file (same as bullet 1) or the top-level extending config. Since the whole point of this section is to explain the extends behaviour, it's worth being explicit.

✏️ Suggested rewording
-- Other strings are treated as paths relative to the entry configuration file.
+- Other strings (e.g. bare package names) are resolved relative to the
+  top-level configuration file that Biome loaded — i.e. the extending config,
+  not the file where the entry is declared.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Scoped package specifiers (starting with `@`) are resolved via
`package.json` resolution (for example, from `node_modules` or workspaces).
- Other strings are treated as paths relative to the entry configuration file.
- Scoped package specifiers (starting with `@`) are resolved via
`package.json` resolution (for example, from `node_modules` or workspaces).
- Other strings (e.g. bare package names) are resolved relative to the
top-level configuration file that Biome loaded — i.e. the extending config,
not the file where the entry is declared.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/linter/plugins.mdx` around lines 39 - 41, The phrase "entry
configuration file" is ambiguous in the third bullet describing extends
resolution; update that bullet to explicitly say it means "the configuration
file that contains the extends property (i.e., the file doing the
extending/declaring)", not the top-level extended config. Concretely, change the
bullet text that currently reads "Other strings are treated as paths relative to
the entry configuration file" to something like "Other strings are treated as
paths relative to the configuration file that declares the extends value (the
file doing the extending)", and ensure this clarification sits alongside the
existing mention of `extends`/scoped package specifiers to remove ambiguity.

Copy link
Author

Choose a reason for hiding this comment

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

I kinda agree with coderabbitai here but I don't really like how it's suggestion is phrased. I could use some help figuring out how to phrase this new behaviour of plugins using the same language that is used in the Biome docs.

Copy link
Author

Choose a reason for hiding this comment

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

After thinking about this for a while I think this wording is better:

Suggested change
- Scoped package specifiers (starting with `@`) are resolved via
`package.json` resolution (for example, from `node_modules` or workspaces).
- Other strings are treated as paths relative to the entry configuration file.
- Scoped package specifiers (starting with `@`) are resolved via
`package.json` resolution (for example, from `node_modules` or workspaces).
- Other strings (e.g. bare package names) are are unchanged and will continue to be resolved relative to the
top-level configuration file that Biome loaded — i.e. the same directory of the config used to power `biome lint`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant