Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ematipico
Copy link
Member

Summary

This PR moves to schemars v1, which is a breaking change.

Important

This PR has been entirely created using Claude Code. I feed it with the migration guide, the PR from #6894

I made sure there were no regressions inside workspace.ts. The only regressions you'll are around comments, but the rest of the types are the same.

I also took the opportunity to fix the annoying problem we had with the Rule options. Now we generate nice numbers and types, automatically! Probably thanks to the new schemars APIs.

The bulk of changes are inside workspace_types.ts, because now the schema is just a JSON object that you query using serde_json::Value. I'm pretty confident that the code is decent enough because we don't have regressions in workspace.ts

Test Plan

CI should stay gree

Docs

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2025

⚠️ No Changeset found

Latest commit: 882414b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Project Area: project A-Linter Area: linter A-Tooling Area: internal tools A-Diagnostic Area: diagnostocis L-Grit Language: GritQL labels Nov 12, 2025
@ematipico ematipico marked this pull request as draft November 12, 2025 16:35
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

This change upgrades workspace schemars usage to v1.x and updates many JsonSchema implementations to the new API: schema_name() now returns std::borrow::Cow<'static, str>, json_schema() takes &mut schemars::SchemaGenerator and returns schemars::Schema. Many derive-based JsonSchema usages are replaced by explicit, feature-gated impls; several schemas were rewritten using schemars::json_schema! or serde_json::Value. Codegen and workspace type handling shifted from SchemaObject/RootSchema to generic Schema/Value representations.

Possibly related PRs

Suggested reviewers

  • dyc3
  • arendjr
  • Conaclos

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.74% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarises the primary change: migrating the codebase to schemars v1, which is the core objective of this PR.
Description check ✅ Passed The description is directly related to the changeset, explaining the schemars v1 migration, disclosure of AI assistance, verification of no regressions in workspace.ts, and improvements to Rule options generation.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/schemars-v1

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
xtask/codegen/src/generate_schema.rs (2)

565-574: Handle the untouched-name case here

Once rename_type goes back to returning an Option, we need to unwrap with a sensible default before inspecting the identifier; otherwise the compiler will keep sulking at us.

-        let name = rename_type(name);
-        let name = name.as_str();
+        let renamed = rename_type(name).unwrap_or_else(|| name.to_string());
+        let name = renamed.as_str();

695-701: Apply the same rename-or-original fallback

Same story for the root reference: unwrap the optional rename so we keep the original title when no simplification applies.

-    let renamed_root = rename_type(root_name);
+    let renamed_root = rename_type(root_name).unwrap_or_else(|| root_name.to_string());
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5cd3d27 and 0a4a2bf.

⛔ Files ignored due to path filters (4)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_analyze/src/categories.rs is excluded by !**/categories.rs and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (31)
  • Cargo.toml (1 hunks)
  • crates/biome_configuration/src/analyzer/linter/mod.rs (1 hunks)
  • crates/biome_configuration/src/analyzer/mod.rs (6 hunks)
  • crates/biome_configuration/src/bool.rs (1 hunks)
  • crates/biome_configuration/src/extends.rs (1 hunks)
  • crates/biome_configuration/src/lib.rs (1 hunks)
  • crates/biome_configuration/src/overrides.rs (1 hunks)
  • crates/biome_diagnostics/src/display/backtrace.rs (1 hunks)
  • crates/biome_diagnostics/src/serde.rs (1 hunks)
  • crates/biome_diagnostics_categories/Cargo.toml (1 hunks)
  • crates/biome_diagnostics_categories/build.rs (1 hunks)
  • crates/biome_fs/src/path.rs (1 hunks)
  • crates/biome_glob/src/editorconfig.rs (1 hunks)
  • crates/biome_glob/src/lib.rs (1 hunks)
  • crates/biome_grit_patterns/src/grit_target_language.rs (1 hunks)
  • crates/biome_rule_options/Cargo.toml (1 hunks)
  • crates/biome_rule_options/src/no_restricted_elements.rs (1 hunks)
  • crates/biome_rule_options/src/no_undeclared_dependencies.rs (1 hunks)
  • crates/biome_rule_options/src/organize_imports/import_groups.rs (1 hunks)
  • crates/biome_rule_options/src/shared/restricted_regex.rs (1 hunks)
  • crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1 hunks)
  • crates/biome_rule_options/src/use_filenaming_convention.rs (1 hunks)
  • crates/biome_rule_options/src/use_naming_convention.rs (2 hunks)
  • crates/biome_service/src/workspace.rs (3 hunks)
  • crates/biome_service/src/workspace_types.rs (9 hunks)
  • crates/biome_text_size/src/schemars_impls.rs (2 hunks)
  • crates/biome_wasm/Cargo.toml (1 hunks)
  • crates/biome_wasm/build.rs (2 hunks)
  • crates/biome_wasm/src/utils.rs (1 hunks)
  • xtask/codegen/src/generate_bindings.rs (1 hunks)
  • xtask/codegen/src/generate_schema.rs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
crates/biome_service/src/workspace.rs

📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)

Implement and expose the Workspace trait in src/workspace.rs

Files:

  • crates/biome_service/src/workspace.rs
🧠 Learnings (36)
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Prefer implementing the Diagnostic trait via `#[derive(Diagnostic)]`

Applied to files:

  • crates/biome_wasm/src/utils.rs
  • crates/biome_diagnostics/src/serde.rs
  • crates/biome_configuration/src/analyzer/mod.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`

Applied to files:

  • crates/biome_wasm/src/utils.rs
  • crates/biome_diagnostics/src/serde.rs
  • crates/biome_diagnostics_categories/Cargo.toml
  • crates/biome_diagnostics_categories/build.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Specify static properties (category, severity, description, message, location, tags) with `#[diagnostic(...)]`

Applied to files:

  • crates/biome_wasm/src/utils.rs
  • crates/biome_diagnostics/src/serde.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: `#[derive(Diagnostic)]` is supported on enums; each variant must contain a type that is itself a diagnostic

Applied to files:

  • crates/biome_wasm/src/utils.rs
  • crates/biome_diagnostics/src/serde.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Types deriving `Diagnostic` must also implement `Debug`

Applied to files:

  • crates/biome_wasm/src/utils.rs
  • crates/biome_diagnostics/src/serde.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.

Applied to files:

  • crates/biome_wasm/src/utils.rs
  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_rule_options/src/no_restricted_elements.rs
  • xtask/codegen/src/generate_schema.rs
  • crates/biome_rule_options/src/use_exhaustive_dependencies.rs
  • crates/biome_wasm/build.rs
  • crates/biome_fs/src/path.rs
  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_rule_options/src/use_naming_convention.rs
  • crates/biome_rule_options/src/organize_imports/import_groups.rs
  • crates/biome_rule_options/src/no_undeclared_dependencies.rs
  • crates/biome_diagnostics_categories/Cargo.toml
  • crates/biome_service/src/workspace_types.rs
  • crates/biome_configuration/src/analyzer/mod.rs
  • crates/biome_diagnostics/src/display/backtrace.rs
  • crates/biome_configuration/src/extends.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`

Applied to files:

  • crates/biome_wasm/src/utils.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import and use the `FormatNode` trait for AST nodes

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
  • xtask/codegen/src/generate_schema.rs
  • crates/biome_wasm/build.rs
  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_rule_options/src/use_naming_convention.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_wasm/build.rs
  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_wasm/Cargo.toml
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
  • xtask/codegen/src/generate_schema.rs
  • crates/biome_wasm/build.rs
  • crates/biome_fs/src/path.rs
  • crates/biome_grit_patterns/src/grit_target_language.rs
  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_rule_options/src/use_naming_convention.rs
  • crates/biome_rule_options/src/organize_imports/import_groups.rs
  • crates/biome_configuration/src/overrides.rs
  • crates/biome_wasm/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
  • crates/biome_configuration/src/analyzer/mod.rs
  • crates/biome_configuration/src/extends.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/**/*.rs : Do not copy or clone data between module graph entries (including behind Arc). Each module must avoid holding duplicated data from another module to enable simple invalidation.

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_wasm/build.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/js_module_info/scoped_resolver.rs : Full inference must resolve TypeReference::Import across modules to TypeReference::Resolved when the target is available in the module graph.

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_wasm/build.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Parser type must implement the biome_parser::Parser trait and hold context, token source, and optional options

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Do not attempt to fix code; if a mandatory token/node is missing, return `None` instead

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_wasm/build.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Lexer must implement the biome_parser::Lexer trait

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Add the provided AsFormat, IntoFormat, and iterator plumbing code to lib.rs

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/context.rs : Create HtmlFormatContext in context.rs with comments and source_map fields and implement FormatContext and CstFormatContext

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_wasm/build.rs
  • crates/biome_fs/src/path.rs
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_wasm/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Implement the `Format` trait for your node type and use `JsFormatter` with `write!`/`format_args!` to define formatting

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_rule_options/src/use_naming_convention.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_wasm/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
📚 Learning: 2025-10-15T09:20:45.587Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_aria_metadata/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:45.587Z
Learning: Applies to crates/biome_aria_metadata/**/{build.rs,aria-data.json} : Keep aria-data.json at the expected location/name because build.rs uses it to generate ARIA metadata

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_wasm/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output

Applied to files:

  • crates/biome_wasm/build.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_wasm/build.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • crates/biome_wasm/build.rs
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.

Applied to files:

  • crates/biome_fs/src/path.rs
  • crates/biome_configuration/src/lib.rs
  • crates/biome_configuration/src/overrides.rs
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.

Applied to files:

  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
  • crates/biome_service/src/workspace_types.rs
  • crates/biome_configuration/src/extends.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/client.rs : WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer

Applied to files:

  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode

Applied to files:

  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Applied to files:

  • crates/biome_rule_options/Cargo.toml
  • crates/biome_wasm/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use `dbg_write!` to debug and inspect the emitted IR during formatting

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-08-20T16:24:59.781Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7266
File: crates/biome_js_type_info/src/type.rs:94-102
Timestamp: 2025-08-20T16:24:59.781Z
Learning: In crates/biome_js_type_info/src/type.rs, the flattened_union_variants() method returns TypeReference instances that already have the correct module IDs applied to them. These references should be used directly with resolver.resolve_reference() without applying additional module ID transformations, as variant references may originate from nested unions in different modules.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : For non-mandatory tokens, use the provided helper constructors (e.g., `token`, `space_token`, `dynamic_token`)

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/js_module_info/collector.rs : Thin (module-level) inference should resolve local and global bindings to TypeReference::Resolved, mark imported bindings as TypeReference::Import, and fall back to TypeReference::Unknown if unresolved.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
🧬 Code graph analysis (26)
xtask/codegen/src/generate_bindings.rs (2)
crates/biome_service/src/workspace_types.rs (2)
  • SchemaGenerator (722-722)
  • SchemaGenerator (723-723)
crates/biome_wasm/build.rs (1)
  • SchemaGenerator (25-26)
crates/biome_diagnostics/src/serde.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_diagnostics/src/display/backtrace.rs (2)
  • schema_name (96-98)
  • json_schema (100-102)
crates/biome_rule_options/src/no_restricted_elements.rs (1)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_glob/src/lib.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_glob/src/editorconfig.rs (2)
  • schema_name (157-159)
  • json_schema (161-163)
crates/biome_glob/src/editorconfig.rs (5)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_glob/src/lib.rs (2)
  • schema_name (382-384)
  • json_schema (386-388)
xtask/codegen/src/generate_schema.rs (1)
crates/biome_service/src/workspace_types.rs (1)
  • rename_type (47-65)
crates/biome_configuration/src/analyzer/linter/mod.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (12)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_rule_options/src/no_restricted_elements.rs (2)
  • schema_name (46-48)
  • json_schema (50-55)
crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_wasm/build.rs (2)
crates/biome_service/src/workspace_types.rs (2)
  • SchemaGenerator (722-722)
  • SchemaGenerator (723-723)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
crates/biome_rule_options/src/use_filenaming_convention.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_fs/src/path.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_service/src/workspace.rs (6)
  • schema_name (426-428)
  • schema_name (673-675)
  • json_schema (430-444)
  • json_schema (677-679)
  • generator (432-432)
  • generator (433-433)
crates/biome_configuration/src/lib.rs (7)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_fs/src/path.rs (2)
  • schema_name (246-248)
  • json_schema (250-252)
crates/biome_glob/src/lib.rs (2)
  • schema_name (382-384)
  • json_schema (386-388)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
crates/biome_grit_patterns/src/grit_target_language.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_text_size/src/schemars_impls.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (6)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
crates/biome_configuration/src/bool.rs (1)
  • schema_name (105-107)
crates/biome_configuration/src/lib.rs (1)
  • schema_name (430-432)
crates/biome_rule_options/src/use_naming_convention.rs (2)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_rule_options/src/organize_imports/import_groups.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_service/src/workspace.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_configuration/src/overrides.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_glob/src/lib.rs (2)
  • schema_name (382-384)
  • json_schema (386-388)
crates/biome_rule_options/src/no_undeclared_dependencies.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_rule_options/src/shared/restricted_regex.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_service/src/workspace_types.rs (3)
crates/biome_wasm/build.rs (1)
  • SchemaGenerator (25-26)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
xtask/codegen/src/generate_schema.rs (1)
  • rename_type (30-45)
crates/biome_diagnostics_categories/build.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/analyzer/mod.rs (12)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/analyzer/mod.rs (6)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_service/src/workspace.rs (6)
  • schema_name (426-428)
  • schema_name (673-675)
  • json_schema (430-444)
  • json_schema (677-679)
  • generator (432-432)
  • generator (433-433)
crates/biome_configuration/src/bool.rs (13)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_diagnostics/src/display/backtrace.rs (2)
  • schema_name (96-98)
  • json_schema (100-102)
crates/biome_diagnostics/src/serde.rs (2)
  • schema_name (364-366)
  • json_schema (368-370)
crates/biome_fs/src/path.rs (2)
  • schema_name (246-248)
  • json_schema (250-252)
crates/biome_glob/src/editorconfig.rs (2)
  • schema_name (157-159)
  • json_schema (161-163)
crates/biome_glob/src/lib.rs (2)
  • schema_name (382-384)
  • json_schema (386-388)
crates/biome_rule_options/src/no_restricted_elements.rs (2)
  • schema_name (46-48)
  • json_schema (50-55)
crates/biome_service/src/workspace_types.rs (2)
  • SchemaGenerator (722-722)
  • SchemaGenerator (723-723)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
crates/biome_diagnostics/src/display/backtrace.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/analyzer/mod.rs (21)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (446-448)
  • schema_name (496-498)
  • schema_name (606-608)
  • schema_name (814-816)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (450-465)
  • json_schema (500-517)
  • json_schema (609-611)
  • json_schema (817-819)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (452-452)
  • generator (453-453)
  • generator (502-502)
  • generator (503-503)
  • generator (504-504)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_diagnostics/src/serde.rs (2)
  • schema_name (364-366)
  • json_schema (368-370)
crates/biome_configuration/src/extends.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
🔇 Additional comments (30)
crates/biome_wasm/src/utils.rs (1)

11-12: Good – clarifying comment for generated type.

Adding this comment makes it clear to future maintainers that IDiagnostic is auto-generated and not to be hand-edited. Well done.

crates/biome_wasm/build.rs (2)

10-10: Import path correctly updated for schemars v1.

The migration from schemars::r#gen to schemars::generate aligns with the v1 API.


27-27: Formatting improvement.

Minor readability enhancement.

crates/biome_rule_options/src/use_naming_convention.rs (2)

499-508: LGTM! Correct schemars v1 migration.

The JsonSchema implementation correctly adopts the new API: schema_name() returns Cow::Borrowed, and json_schema() uses the simplified type paths. The delegation to HashSet preserves the existing schema generation behaviour.


649-657: LGTM! Correct schemars v1 migration.

The JsonSchema implementation correctly adopts the new API, mirroring the changes in RestrictedModifiers. The delegation to HashSet<Format> maintains the existing behaviour.

crates/biome_diagnostics_categories/Cargo.toml (1)

15-17: LGTM! Schema feature correctly extended for schemars v1.

The addition of serde_json as an optional dependency and its inclusion in the schema feature aligns with the schemars v1 migration requirements.

Also applies to: 23-23

crates/biome_rule_options/Cargo.toml (1)

30-30: LGTM! Consistent schema feature extension.

The changes mirror the pattern across the codebase and properly support the schemars v1 API.

Also applies to: 38-38

crates/biome_text_size/src/schemars_impls.rs (1)

9-33: LGTM! Clean migration to schemars v1 API.

The updated signatures follow the new API conventions, and using Cow::Borrowed is more efficient than allocating String instances. The implementation logic remains unchanged.

crates/biome_configuration/src/extends.rs (1)

64-79: LGTM! JsonSchema implementation properly updated.

The migration follows the established pattern: schema_name() returns Cow::Borrowed and json_schema() uses the updated generator type.

crates/biome_glob/src/lib.rs (1)

380-389: LGTM! Glob schema implementation aligned with v1 API.

The implementation correctly delegates to String::json_schema() with the updated generator type.

crates/biome_glob/src/editorconfig.rs (1)

155-164: LGTM! EditorconfigGlob schema correctly implemented.

The schema delegation to String::json_schema() is appropriate since EditorconfigGlob serialises as a string.

crates/biome_grit_patterns/src/grit_target_language.rs (1)

77-90: LGTM! Enum schema correctly constructed for v1 API.

The implementation builds the enum schema using serde_json::Map, which is appropriate for representing the language variants in JSON Schema format.

crates/biome_diagnostics/src/serde.rs (1)

362-371: LGTM! DiagnosticTags schema properly delegated.

The delegation to Vec<DiagnosticTag>::json_schema() correctly represents the bitflags as a list in the schema.

crates/biome_rule_options/src/shared/restricted_regex.rs (1)

109-115: LGTM! Clean migration to schemars v1 API.

The JsonSchema implementation correctly adopts the new API: schema_name() returns Cow::Borrowed, and json_schema() uses the updated signature.

crates/biome_rule_options/src/organize_imports/import_groups.rs (1)

318-339: LGTM! Schema manipulation correctly adapted.

The migration properly updates the API signatures and preserves the logic that adds negated variants to the enum schema.

crates/biome_rule_options/src/use_filenaming_convention.rs (1)

100-105: LGTM! Straightforward API migration.

Correctly updated to the new schemars v1 signatures with delegation to HashSet<FilenameCase>.

crates/biome_diagnostics/src/display/backtrace.rs (1)

96-102: LGTM! Clean delegation pattern.

The JsonSchema implementation is correctly updated to schemars v1 with proper delegation.

crates/biome_rule_options/src/no_undeclared_dependencies.rs (1)

63-84: LGTM! Excellent use of the json_schema! macro.

The migration properly leverages the new macro-based approach for inline schema generation whilst preserving the oneOf semantics.

crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)

158-190: LGTM! Complex schema well-migrated.

The oneOf schema with multiple type variants (boolean, integer array, string array) is correctly expressed using the json_schema! macro.

crates/biome_diagnostics_categories/build.rs (1)

69-78: LGTM! Build-time schema generation adapted correctly.

The manual serde_json::Map construction for the enum schema is appropriate for this code-generation context.

crates/biome_rule_options/src/no_restricted_elements.rs (1)

46-55: LGTM! Schema reference with constraints preserved.

The migration correctly uses the json_schema! macro to maintain the $ref with minProperties constraint.

Cargo.toml (1)

233-233: LGTM! Schemars v1 migration looks correct.

The version bump and feature flag update (smallvecsmallvec1) align with schemars 1.0.4 requirements.

xtask/codegen/src/generate_bindings.rs (1)

13-13: LGTM! Import paths updated correctly.

The migration from schemars::r#gen:: to schemars:: and schemars::generate:: is proper for schemars v1.

crates/biome_wasm/Cargo.toml (1)

25-31: LGTM! Schema dependencies properly added.

The additions of schemars and serde_json as workspace dependencies, along with enabling the "schema" feature on biome_service, correctly support the schemars v1 migration.

crates/biome_configuration/src/overrides.rs (1)

104-109: LGTM! JsonSchema implementation updated correctly.

The migration to Cow<'static, str> for schema_name() and the updated json_schema() signature align with schemars v1 requirements.

crates/biome_configuration/src/lib.rs (1)

430-436: LGTM! Schema type migration looks good.

The Schema type's JsonSchema implementation correctly adopts the new schemars v1 API.

crates/biome_service/src/workspace.rs (2)

673-679: LGTM! FeatureName schema implementation is clean.

Delegating to Vec<FeatureKind>::json_schema(generator) is appropriate here.


426-444: Inconsistent schema reference formats confirmed—other files need fixing.

The analysis confirms the inconsistency: workspace.rs correctly uses "#/components/schemas/" (OpenAPI 3.0 format) to match SchemaSettings::openapi3() used throughout codegen. However, crates/biome_configuration/src/analyzer/linter/mod.rs and crates/biome_rule_options/src/no_restricted_elements.rs incorrectly use "#/definitions/" (JSON Schema Draft format).

Since codegen explicitly generates these types with openapi3(), the mismatched reference formats in those files will break schema validation when the schemas are combined. Update those two files to use "#/components/schemas/" instead.

⛔ Skipped due to learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/client.rs : WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer
crates/biome_configuration/src/analyzer/linter/mod.rs (1)

67-81: LGTM! RuleDomains schema migration complete.

The implementation correctly uses the json_schema! macro and the new schemars v1 API. (Note: Schema reference format verified separately.)

crates/biome_fs/src/path.rs (1)

246-252: LGTM! BiomePath schema migration complete.

The JsonSchema implementation follows the same pattern as other wrapper types, correctly delegating to the underlying String schema.

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages labels Nov 12, 2025
@ematipico ematipico marked this pull request as ready for review November 12, 2025 17:09
@ematipico ematipico requested review from a team November 12, 2025 17:09
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 12, 2025

CodSpeed Performance Report

Merging #8087 will not alter performance

Comparing feat/schemars-v1 (882414b) with main (7983940)

Summary

✅ 58 untouched
⏩ 95 skipped1

Footnotes

  1. 95 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 51108 51108 0
Passed 49895 49895 0
Failed 1171 1171 0
Panics 42 42 0
Coverage 97.63% 97.63% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6322 6322 0
Passed 2106 2106 0
Failed 4216 4216 0
Panics 0 0 0
Coverage 33.31% 33.31% 0.00%

ts/babel

Test result main count This PR count Difference
Total 835 835 0
Passed 742 742 0
Failed 93 93 0
Panics 0 0 0
Coverage 88.86% 88.86% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18815 18815 0
Passed 14066 14066 0
Failed 4748 4748 0
Panics 1 1 0
Coverage 74.76% 74.76% 0.00%

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: 5

🧹 Nitpick comments (1)
crates/biome_service/src/workspace_types.rs (1)

44-74: Consider deduplicating the rename_type function.

This function appears identical to the one in xtask/codegen/src/generate_schema.rs (lines 29-56). Consider extracting it to a shared module to avoid maintenance burden.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a4a2bf and f48bf60.

⛔ Files ignored due to path filters (4)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_analyze/src/categories.rs is excluded by !**/categories.rs and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (35)
  • Cargo.toml (1 hunks)
  • crates/biome_configuration/src/analyzer/linter/mod.rs (1 hunks)
  • crates/biome_configuration/src/analyzer/mod.rs (9 hunks)
  • crates/biome_configuration/src/bool.rs (1 hunks)
  • crates/biome_configuration/src/extends.rs (1 hunks)
  • crates/biome_configuration/src/lib.rs (1 hunks)
  • crates/biome_configuration/src/overrides.rs (1 hunks)
  • crates/biome_diagnostics/src/display/backtrace.rs (1 hunks)
  • crates/biome_diagnostics/src/serde.rs (1 hunks)
  • crates/biome_diagnostics_categories/Cargo.toml (1 hunks)
  • crates/biome_diagnostics_categories/build.rs (1 hunks)
  • crates/biome_fs/src/path.rs (1 hunks)
  • crates/biome_glob/src/editorconfig.rs (1 hunks)
  • crates/biome_glob/src/lib.rs (1 hunks)
  • crates/biome_grit_patterns/src/grit_target_language.rs (1 hunks)
  • crates/biome_js_formatter/src/context/trailing_commas.rs (1 hunks)
  • crates/biome_json_formatter/src/context.rs (1 hunks)
  • crates/biome_rule_options/Cargo.toml (1 hunks)
  • crates/biome_rule_options/src/no_restricted_elements.rs (1 hunks)
  • crates/biome_rule_options/src/no_undeclared_dependencies.rs (1 hunks)
  • crates/biome_rule_options/src/organize_imports/import_groups.rs (1 hunks)
  • crates/biome_rule_options/src/shared/restricted_regex.rs (1 hunks)
  • crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs (1 hunks)
  • crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1 hunks)
  • crates/biome_rule_options/src/use_filenaming_convention.rs (1 hunks)
  • crates/biome_rule_options/src/use_import_type.rs (1 hunks)
  • crates/biome_rule_options/src/use_naming_convention.rs (2 hunks)
  • crates/biome_service/src/workspace.rs (3 hunks)
  • crates/biome_service/src/workspace_types.rs (9 hunks)
  • crates/biome_text_size/src/schemars_impls.rs (2 hunks)
  • crates/biome_wasm/Cargo.toml (1 hunks)
  • crates/biome_wasm/build.rs (2 hunks)
  • crates/biome_wasm/src/utils.rs (1 hunks)
  • xtask/codegen/src/generate_bindings.rs (1 hunks)
  • xtask/codegen/src/generate_schema.rs (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_wasm/src/utils.rs
🚧 Files skipped from review as they are similar to previous changes (9)
  • Cargo.toml
  • crates/biome_diagnostics/src/serde.rs
  • crates/biome_configuration/src/analyzer/linter/mod.rs
  • crates/biome_glob/src/lib.rs
  • crates/biome_fs/src/path.rs
  • crates/biome_text_size/src/schemars_impls.rs
  • crates/biome_grit_patterns/src/grit_target_language.rs
  • crates/biome_rule_options/src/use_filenaming_convention.rs
  • crates/biome_diagnostics_categories/Cargo.toml
🧰 Additional context used
📓 Path-based instructions (2)
crates/biome_js_formatter/**/*.rs

📄 CodeRabbit inference engine (crates/biome_js_formatter/CONTRIBUTING.md)

crates/biome_js_formatter/**/*.rs: Implement the Format trait for your node type and use JsFormatter with write!/format_args! to define formatting
Import and use the FormatNode trait for AST nodes
When a token is mandatory and present in the AST, use the AST-provided token (e.g., node.l_paren_token().format()) instead of emitting a static token
For non-mandatory tokens, use the provided helper constructors (e.g., token, space_token, dynamic_token)
Do not attempt to fix code; if a mandatory token/node is missing, return None instead
Use dbg_write! to debug and inspect the emitted IR during formatting

Files:

  • crates/biome_js_formatter/src/context/trailing_commas.rs
crates/biome_service/src/workspace.rs

📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)

Implement and expose the Workspace trait in src/workspace.rs

Files:

  • crates/biome_service/src/workspace.rs
🧠 Learnings (34)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_glob/src/editorconfig.rs
  • crates/biome_wasm/build.rs
  • crates/biome_configuration/src/analyzer/mod.rs
  • crates/biome_rule_options/src/use_naming_convention.rs
  • xtask/codegen/src/generate_schema.rs
  • crates/biome_js_formatter/src/context/trailing_commas.rs
  • crates/biome_service/src/workspace.rs
  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs
  • crates/biome_wasm/Cargo.toml
  • crates/biome_rule_options/src/organize_imports/import_groups.rs
  • crates/biome_configuration/src/overrides.rs
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_wasm/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_configuration/src/analyzer/mod.rs
  • crates/biome_rule_options/src/use_exhaustive_dependencies.rs
  • crates/biome_rule_options/src/no_restricted_elements.rs
  • crates/biome_rule_options/src/use_naming_convention.rs
  • xtask/codegen/src/generate_schema.rs
  • crates/biome_rule_options/src/no_undeclared_dependencies.rs
  • crates/biome_service/src/workspace.rs
  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs
  • crates/biome_rule_options/src/use_import_type.rs
  • crates/biome_rule_options/src/organize_imports/import_groups.rs
  • crates/biome_configuration/src/extends.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Do not attempt to fix code; if a mandatory token/node is missing, return `None` instead

Applied to files:

  • crates/biome_wasm/build.rs
  • xtask/codegen/src/generate_schema.rs
  • crates/biome_js_formatter/src/context/trailing_commas.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_wasm/build.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import and use the `FormatNode` trait for AST nodes

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_rule_options/src/use_naming_convention.rs
  • xtask/codegen/src/generate_schema.rs
  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs
  • crates/biome_rule_options/src/use_import_type.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:20:45.587Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_aria_metadata/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:45.587Z
Learning: Applies to crates/biome_aria_metadata/**/{build.rs,aria-data.json} : Keep aria-data.json at the expected location/name because build.rs uses it to generate ARIA metadata

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_wasm/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • crates/biome_wasm/build.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_service/src/workspace.rs
  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_wasm/Cargo.toml
  • crates/biome_service/src/workspace_types.rs
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • crates/biome_wasm/build.rs
  • crates/biome_service/src/workspace.rs
  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_wasm/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.

Applied to files:

  • crates/biome_configuration/src/analyzer/mod.rs
  • crates/biome_rule_options/src/use_exhaustive_dependencies.rs
  • crates/biome_js_formatter/src/context/trailing_commas.rs
  • crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs
  • crates/biome_rule_options/src/use_import_type.rs
  • crates/biome_configuration/src/extends.rs
  • crates/biome_service/src/workspace_types.rs
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Prefer implementing the Diagnostic trait via `#[derive(Diagnostic)]`

Applied to files:

  • crates/biome_configuration/src/analyzer/mod.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Implement the `Format` trait for your node type and use `JsFormatter` with `write!`/`format_args!` to define formatting

Applied to files:

  • crates/biome_rule_options/src/use_naming_convention.rs
  • xtask/codegen/src/generate_schema.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Parser type must implement the biome_parser::Parser trait and hold context, token source, and optional options

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Lexer must implement the biome_parser::Lexer trait

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Add the provided AsFormat, IntoFormat, and iterator plumbing code to lib.rs

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/context.rs : Create HtmlFormatContext in context.rs with comments and source_map fields and implement FormatContext and CstFormatContext

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_wasm/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.

Applied to files:

  • crates/biome_configuration/src/lib.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_configuration/src/extends.rs
  • crates/biome_configuration/src/overrides.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/client.rs : WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer

Applied to files:

  • crates/biome_service/src/workspace.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode

Applied to files:

  • crates/biome_service/src/workspace.rs
  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/**/*.rs : Do not copy or clone data between module graph entries (including behind Arc). Each module must avoid holding duplicated data from another module to enable simple invalidation.

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/js_module_info/scoped_resolver.rs : Full inference must resolve TypeReference::Import across modules to TypeReference::Resolved when the target is available in the module graph.

Applied to files:

  • xtask/codegen/src/generate_bindings.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`

Applied to files:

  • crates/biome_diagnostics_categories/build.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs

Applied to files:

  • crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs
  • crates/biome_rule_options/src/use_import_type.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Applied to files:

  • crates/biome_wasm/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use `dbg_write!` to debug and inspect the emitted IR during formatting

Applied to files:

  • crates/biome_wasm/Cargo.toml
📚 Learning: 2025-08-20T16:24:59.781Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7266
File: crates/biome_js_type_info/src/type.rs:94-102
Timestamp: 2025-08-20T16:24:59.781Z
Learning: In crates/biome_js_type_info/src/type.rs, the flattened_union_variants() method returns TypeReference instances that already have the correct module IDs applied to them. These references should be used directly with resolver.resolve_reference() without applying additional module ID transformations, as variant references may originate from nested unions in different modules.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : For non-mandatory tokens, use the provided helper constructors (e.g., `token`, `space_token`, `dynamic_token`)

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/js_module_info/collector.rs : Thin (module-level) inference should resolve local and global bindings to TypeReference::Resolved, mark imported bindings as TypeReference::Import, and fall back to TypeReference::Unknown if unresolved.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
🧬 Code graph analysis (23)
crates/biome_glob/src/editorconfig.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_wasm/build.rs (2)
crates/biome_service/src/workspace_types.rs (2)
  • SchemaGenerator (731-731)
  • SchemaGenerator (732-732)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
crates/biome_configuration/src/analyzer/mod.rs (5)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
  • schema_name (108-110)
  • json_schema (112-118)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_service/src/workspace.rs (6)
  • schema_name (426-428)
  • schema_name (673-675)
  • json_schema (430-444)
  • json_schema (677-679)
  • generator (432-432)
  • generator (433-433)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)
crates/biome_configuration/src/analyzer/mod.rs (18)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
crates/biome_rule_options/src/no_restricted_elements.rs (2)
crates/biome_configuration/src/analyzer/mod.rs (18)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_rule_options/src/use_naming_convention.rs (5)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
xtask/codegen/src/generate_schema.rs (1)
crates/biome_service/src/workspace_types.rs (1)
  • rename_type (47-74)
crates/biome_diagnostics/src/display/backtrace.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_diagnostics/src/serde.rs (2)
  • schema_name (364-366)
  • json_schema (368-370)
crates/biome_js_formatter/src/context/trailing_commas.rs (1)
crates/biome_json_formatter/src/context.rs (2)
  • schema_name (112-114)
  • json_schema (116-122)
crates/biome_rule_options/src/no_undeclared_dependencies.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (18)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_configuration/src/lib.rs (5)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_glob/src/lib.rs (2)
  • schema_name (382-384)
  • json_schema (386-388)
crates/biome_service/src/workspace.rs (1)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_rule_options/src/shared/restricted_regex.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
xtask/codegen/src/generate_bindings.rs (2)
crates/biome_service/src/workspace_types.rs (2)
  • SchemaGenerator (731-731)
  • SchemaGenerator (732-732)
crates/biome_wasm/build.rs (1)
  • SchemaGenerator (25-26)
crates/biome_diagnostics_categories/build.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (18)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs (3)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
  • schema_name (108-110)
  • json_schema (112-118)
crates/biome_json_formatter/src/context.rs (2)
  • schema_name (112-114)
  • json_schema (116-122)
crates/biome_rule_options/src/use_import_type.rs (2)
  • schema_name (38-40)
  • json_schema (42-48)
crates/biome_rule_options/src/use_import_type.rs (2)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
  • schema_name (108-110)
  • json_schema (112-118)
crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs (2)
  • schema_name (28-30)
  • json_schema (32-38)
crates/biome_rule_options/src/organize_imports/import_groups.rs (2)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_json_formatter/src/context.rs (3)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
  • schema_name (108-110)
  • json_schema (112-118)
crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs (2)
  • schema_name (28-30)
  • json_schema (32-38)
crates/biome_rule_options/src/use_import_type.rs (2)
  • schema_name (38-40)
  • json_schema (42-48)
crates/biome_configuration/src/bool.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
  • schema_name (67-69)
  • json_schema (71-81)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/extends.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
crates/biome_configuration/src/overrides.rs (2)
  • schema_name (104-106)
  • json_schema (107-109)
crates/biome_service/src/workspace_types.rs (3)
crates/biome_wasm/build.rs (1)
  • SchemaGenerator (25-26)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
xtask/codegen/src/generate_schema.rs (1)
  • rename_type (30-57)
crates/biome_configuration/src/overrides.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
  • schema_name (106-108)
  • schema_name (212-214)
  • schema_name (373-375)
  • schema_name (448-450)
  • schema_name (491-493)
  • schema_name (541-543)
  • schema_name (651-653)
  • schema_name (859-861)
  • schema_name (979-981)
  • json_schema (110-122)
  • json_schema (216-228)
  • json_schema (377-387)
  • json_schema (452-464)
  • json_schema (495-510)
  • json_schema (545-562)
  • json_schema (654-656)
  • json_schema (862-864)
  • json_schema (983-995)
  • generator (112-112)
  • generator (113-113)
  • generator (218-218)
  • generator (219-219)
  • generator (378-378)
  • generator (379-379)
  • generator (453-453)
  • generator (454-454)
  • generator (497-497)
  • generator (498-498)
  • generator (547-547)
  • generator (548-548)
  • generator (549-549)
  • generator (985-985)
  • generator (986-986)
crates/biome_configuration/src/bool.rs (2)
  • schema_name (105-107)
  • json_schema (109-111)
crates/biome_configuration/src/extends.rs (2)
  • schema_name (65-67)
  • json_schema (69-78)
crates/biome_configuration/src/lib.rs (2)
  • schema_name (430-432)
  • json_schema (434-436)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Documentation
  • GitHub Check: Check Dependencies
  • GitHub Check: Check JS Files
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Parser conformance
🔇 Additional comments (18)
xtask/codegen/src/generate_bindings.rs (1)

13-13: LGTM! Import path correctly updated for schemars v1.

The import path adjustment from r#gen to generate aligns with the schemars v1 API, and the usage pattern remains consistent throughout the file.

crates/biome_rule_options/src/shared/restricted_regex.rs (1)

107-116: LGTM! Clean schemars v1 migration.

The changes correctly adopt the new API: Cow<'static, str> for schema names and updated type paths for SchemaGenerator and Schema. The implementation properly delegates to String::json_schema(generator), which is appropriate since restricted regexes are serialised as strings.

crates/biome_rule_options/src/use_import_type.rs (1)

36-49: LGTM! Clean migration to schemars v1.

The manual JsonSchema implementation correctly replaces the derive macro and follows the established pattern from other enums in the codebase. The enum values properly match the serde camelCase serialisation.

crates/biome_js_formatter/src/context/trailing_commas.rs (1)

106-119: LGTM! Clean schemars v1 migration.

The explicit JsonSchema implementation correctly follows the new API pattern: schema_name() returns Cow::Borrowed, enum values match the variants in declaration order, and the description appropriately specifies JavaScript/TypeScript files.

crates/biome_json_formatter/src/context.rs (1)

110-123: LGTM! Consistent with the JS formatter migration.

The implementation correctly adapts to schemars v1 with the appropriate schema name and enum values for JSON files. The two-value enum (excluding "es5") is correct for JSON context.

crates/biome_wasm/Cargo.toml (2)

25-25: Feature enabling looks sound.

The features = ["schema"] on biome_service in both [dependencies] and [build-dependencies] aligns with enabling schema functionality for the wasm layer and build codegen. This is consistent with the broader schemars v1 migration.

Also applies to: 45-45


31-31: serde_json runtime dependency makes sense.

Adding serde_json to [dependencies] aligns with the PR summary that schemas are now JSON objects queried via serde_json::Value. This is a necessary runtime dependency for wasm bindings.

crates/biome_rule_options/src/no_restricted_elements.rs (1)

46-48: LGTM: Schema name correctly migrated to schemars v1.

The return type and value match the schemars v1 pattern.

crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)

158-159: LGTM!

Correct migration to schemars v1—Cow<'static, str> return type and implementation match the updated API patterns.

crates/biome_configuration/src/bool.rs (1)

104-112: LGTM!

The JsonSchema implementation correctly adopts the schemars v1 API: Cow<'static, str> for the schema name and the updated SchemaGenerator path. Delegating to bool::json_schema(generator) is the right approach.

crates/biome_configuration/src/lib.rs (1)

429-437: LGTM!

The JsonSchema implementation for Schema follows the same pattern as other updated implementations across the crate, correctly using Cow::Borrowed and delegating to String::json_schema(generator).

crates/biome_service/src/workspace.rs (2)

425-445: LGTM with observation.

The FeaturesSupported JsonSchema implementation correctly uses the new schemars v1 API with macro-based schema construction. The references to #/components/schemas/ follow the OpenAPI 3.0 convention, which appears intentional for this migration.


672-680: LGTM!

The FeatureName implementation properly delegates to Vec<FeatureKind>::json_schema(generator), which is the correct approach for this wrapper type.

crates/biome_configuration/src/analyzer/mod.rs (4)

101-123: LGTM!

The feature-gated JsonSchema implementation for RuleConfiguration<T> correctly uses the new schemars v1 API. The dynamic schema naming and oneOf construction using subschema_for is appropriate for this generic type.


207-229: LGTM!

The RuleFixConfiguration<T> implementation follows the same correct pattern as RuleConfiguration<T>, with proper handling of the generic type parameter in the schema name and structure.


486-511: LGTM!

The RuleWithOptions<T> implementation correctly specifies "level" as required and sets additionalProperties: false, which ensures proper validation of the configuration object.


974-996: LGTM!

The SeverityOrGroup<G> implementation correctly uses anyOf to combine the plain and group schemas, which is appropriate for this untagged enum.

crates/biome_service/src/workspace_types.rs (1)

7-42: Migration from SchemaObject to Value is correct.

The code properly handles the type transition. Schema::as_value() returns a reference to the underlying serde_json::Value, making line 572 (root_schema.as_value()) the correct conversion for passing to the queue. Line 560's .get("title") pattern is also valid—Schema wraps the JSON value and exposes compatible accessor methods. All schema access patterns throughout the file use the proper Value API.

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
crates/biome_service/src/workspace_types.rs (2)

319-336: Handle the unwrap on line 328.

value.as_f64().unwrap() will panic if the number can't be converted to f64. Though JSON numbers typically convert cleanly, this should handle the error case gracefully.

Apply this diff:

         Value::Number(value) => AnyTsType::from(
-            make::ts_number_literal_type(make::js_number_literal(value.as_f64().unwrap())).build(),
+            make::ts_number_literal_type(make::js_number_literal(value.as_f64().unwrap_or(0.0))).build(),
         ),

338-357: Handle the unwrap on line 346.

item.unwrap() will panic if the iterator yields an Err. Consider handling this more gracefully.

🧹 Nitpick comments (3)
crates/biome_service/src/workspace_types.rs (3)

44-73: Extract duplicate rename_type to a shared module.

This function duplicates logic from xtask/codegen/src/generate_schema.rs:29-55. Consider moving it to a shared utility module (e.g., biome_codegen_utils) to avoid maintaining identical implementations in two places.


86-149: Extract duplicate property handling logic.

The code for building required_properties (lines 87-94) and property signatures (lines 104-149) is duplicated in the generate_type function (lines 613-621, 626-666). Extract this into a helper function to reduce maintenance burden.

Consider a helper like:

fn build_property_signature(
    property: &str,
    prop_schema: &Value,
    required_properties: &std::collections::HashSet<&str>,
    queue: &mut ModuleQueue,
    root_schema: &Schema,
) -> AnyTsTypeMember {
    // Common logic here
}

613-666: Duplicate property handling logic (again).

This section duplicates the required_properties building (lines 613-621) and property signature generation (lines 626-666) from the instance_type function (lines 87-94, 104-149). Same suggestion: extract to a shared helper.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f48bf60 and 882414b.

⛔ Files ignored due to path filters (1)
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (2)
  • crates/biome_service/src/workspace_types.rs (9 hunks)
  • xtask/codegen/src/generate_schema.rs (2 hunks)
🧰 Additional context used
🧠 Learnings (17)
📓 Common learnings
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import and use the `FormatNode` trait for AST nodes

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Parser type must implement the biome_parser::Parser trait and hold context, token source, and optional options

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Do not attempt to fix code; if a mandatory token/node is missing, return `None` instead

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Lexer must implement the biome_parser::Lexer trait

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Add the provided AsFormat, IntoFormat, and iterator plumbing code to lib.rs

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/context.rs : Create HtmlFormatContext in context.rs with comments and source_map fields and implement FormatContext and CstFormatContext

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • xtask/codegen/src/generate_schema.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Implement the `Format` trait for your node type and use `JsFormatter` with `write!`/`format_args!` to define formatting

Applied to files:

  • xtask/codegen/src/generate_schema.rs
  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-08-20T16:24:59.781Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7266
File: crates/biome_js_type_info/src/type.rs:94-102
Timestamp: 2025-08-20T16:24:59.781Z
Learning: In crates/biome_js_type_info/src/type.rs, the flattened_union_variants() method returns TypeReference instances that already have the correct module IDs applied to them. These references should be used directly with resolver.resolve_reference() without applying additional module ID transformations, as variant references may originate from nested unions in different modules.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : For non-mandatory tokens, use the provided helper constructors (e.g., `token`, `space_token`, `dynamic_token`)

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/js_module_info/scoped_resolver.rs : Full inference must resolve TypeReference::Import across modules to TypeReference::Resolved when the target is available in the module graph.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/js_module_info/collector.rs : Thin (module-level) inference should resolve local and global bindings to TypeReference::Resolved, mark imported bindings as TypeReference::Import, and fall back to TypeReference::Unknown if unresolved.

Applied to files:

  • crates/biome_service/src/workspace_types.rs
🧬 Code graph analysis (2)
xtask/codegen/src/generate_schema.rs (1)
crates/biome_service/src/workspace_types.rs (1)
  • rename_type (47-73)
crates/biome_service/src/workspace_types.rs (3)
crates/biome_wasm/build.rs (1)
  • SchemaGenerator (25-26)
xtask/codegen/src/generate_bindings.rs (3)
  • SchemaGenerator (158-159)
  • SchemaGenerator (161-162)
  • SchemaGenerator (164-165)
xtask/codegen/src/generate_schema.rs (1)
  • rename_type (30-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (26)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Test Node.js API
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: Parser conformance
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: autofix
  • GitHub Check: Check JS Files
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
🔇 Additional comments (15)
xtask/codegen/src/generate_schema.rs (4)

4-5: LGTM—clean migration to schemars v1 types.

The import changes correctly reflect the schemars v1 API shift from RootSchema/SchemaObject to Schema, with serde_json::Value and Map for schema manipulation.


35-36: Excellent—consistent with workspace_types.rs.

The new rename patterns for RuleAssist*, RuleFixConfiguration, and SeverityOrGroup match the implementation in crates/biome_service/src/workspace_types.rs (lines 46-72), maintaining naming consistency across the codebase.

Also applies to: 42-51, 53-54


61-100: LGTM—well-structured migration with backwards compatibility.

The refactored logic correctly:

  • Operates on Schema using serde_json::Value methods
  • Handles both $defs (JSON Schema 2019-09+) and definitions (earlier drafts) with intentional preference for the former
  • Delegates recursive traversal to the new helper function

103-158: LGTM—thorough recursive traversal.

The implementation comprehensively handles:

  • Reference renaming for both #/definitions/ and #/$defs/ formats
  • Properties, items (single object and tuple array forms)
  • Composition keywords (allOf, anyOf, oneOf)
  • Conditional keywords (if, then, else, not)

This ensures all nested schema references are correctly updated during migration.

crates/biome_service/src/workspace_types.rs (11)

7-42: LGTM! Clean migration to schemars v1 API.

The ModuleQueue refactoring to use &'a Value instead of SchemaObject is consistent throughout.


237-257: Nice fix for empty object handling!

Properly generating {} for empty objects with additionalProperties: false addresses an edge case that was likely broken before.


260-307: Solid prefixItems support, but mind the assertions.

The prefixItems handling for tuples is spot on. However, the assertions at lines 284 and 297 will panic if optional nested types appear. If this constraint is guaranteed by schema generation, consider documenting it; otherwise, replace with proper error handling.


359-384: Excellent addition for TypeScript semantics.

Stripping null from optional union types is exactly right—field?: T already implies undefined, so T | null becomes just T. Clean implementation.


424-459: Robust $ref resolution with proper renaming.

Handling multiple $ref formats (#/$defs/, #/definitions/, #/components/schemas/) is thorough. Applying rename_type to references (line 452) ensures consistency with root type naming.


461-492: Mind the assertions in subschema handling.

The allOf/anyOf/oneOf logic is sound, but assertions at lines 467 and 484 will panic on optional nested types. The pretty-printed error message (lines 485-489) is helpful for debugging. If this constraint is by design, document it clearly.


502-516: Smart handling of null-only enums.

Excluding null-only types (enum: [null]) from being marked optional (lines 502-505) is correct—these represent actual null values in unions, not optionality.


522-550: Proper boolean schema support.

Mapping boolean schemas to any (always valid) and never (never valid) aligns with JSON Schema semantics. Tidy addition for v1.


578-585: Good catch on primitive type names.

Skipping reserved primitive names prevents generating invalid TypeScript like export type string = string. Sensible guard.


684-700: Watch the assertion at line 688.

Same pattern as elsewhere: the assertion will panic if optional nested types appear. Verify this constraint is guaranteed upstream.


713-750: Clean WorkspaceMethod migration.

Changing RootSchema to Schema is the expected v1 API change. The rest is straightforward.

@ematipico ematipico merged commit c266319 into main Nov 12, 2025
31 checks passed
@ematipico ematipico deleted the feat/schemars-v1 branch November 12, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Core Area: core A-Diagnostic Area: diagnostocis A-Formatter Area: formatter A-Linter Area: linter A-Project Area: project A-Tooling Area: internal tools L-Grit Language: GritQL L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants