Skip to content

feat(formatter): top-level suppression#8695

Merged
ematipico merged 4 commits intonextfrom
feat/biome-ignore-all-formatter
Jan 6, 2026
Merged

feat(formatter): top-level suppression#8695
ematipico merged 4 commits intonextfrom
feat/biome-ignore-all-formatter

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Jan 5, 2026

Summary

Many users will be happy to have this feature

Test Plan

Added tests for each language

Docs

biomejs/website#3797

@changeset-bot
Copy link

changeset-bot bot commented Jan 5, 2026

🦋 Changeset detected

Latest commit: cec6abb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

Not sure what this means? Click here to learn what changesets are.

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

@ematipico ematipico requested review from a team January 5, 2026 17:37
@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS L-JSON Language: JSON and super languages L-HTML Language: HTML and super languages L-Grit Language: GritQL labels Jan 5, 2026
@ematipico ematipico force-pushed the feat/biome-ignore-all-formatter branch from 2026c28 to fa1d693 Compare January 5, 2026 17:39
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Walkthrough

This PR introduces support for a top-level global suppression comment format (biome-ignore-all format: <explanation>). When placed at the start of a document, Biome skips formatting the entire file. The implementation adds new is_global_suppression and is_global_suppressed methods across the formatter codebase, along with handle_global_suppression helpers in each language formatter's comment handling. Core infrastructure updates occur in the base formatter with corresponding test files added for CSS, GraphQL, Grit, HTML, JavaScript, JSON, and YAML.

Possibly related PRs

Suggested labels

A-Tooling

Suggested reviewers

  • dyc3
  • arendjr
  • Netail

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarises the main change: implementing top-level suppression for the formatter across multiple languages.
Description check ✅ Passed The description is related to the changeset, mentioning that tests were added for each language and referencing a documentation PR, though it could be more detailed.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent 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 ea44643 and cec6abb.

⛔ Files ignored due to path filters (2)
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_formatter/tests/specs/js/module/global_suppression.js.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (1)
  • crates/biome_js_formatter/tests/specs/js/module/global_suppression.js
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_js_formatter/tests/specs/js/module/global_suppression.js
⏰ 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). (23)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: End-to-end tests
  • GitHub Check: Check Dependencies
  • GitHub Check: Documentation
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_formatter)

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

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 5, 2026

CodSpeed Performance Report

Merging #8695 will not alter performance

Comparing feat/biome-ignore-all-formatter (cec6abb) with next (adcce82)

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.

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

Fix all issues with AI Agents 🤖
In @crates/biome_graphql_formatter/src/lib.rs:
- Line 187: Replace the bitwise OR with a logical OR in the conditional: in the
expression using self.is_suppressed(node, f) | self.is_global_suppressed(node,
f) change the operator to || so it becomes self.is_suppressed(node, f) ||
self.is_global_suppressed(node, f); this ensures short-circuiting and idiomatic
boolean logic when evaluating those two predicates.

In @crates/biome_grit_formatter/src/comments.rs:
- Line 103: Remove the redundant comparison
"node.text_range_with_trivia().start() >= TextSize::from(0)" and unindent the
inner block so its code runs unconditionally; locate the conditional around
node.text_range_with_trivia().start() in biome_grit_formatter's comments
handling (and apply the same change to the six other listed formatter files:
biome_yaml_formatter/src/comments.rs, biome_json_formatter/src/comments.rs,
biome_html_formatter/src/comments.rs, biome_js_formatter/src/comments.rs,
biome_graphql_formatter/src/comments.rs, biome_css_formatter/src/comments.rs) —
simply delete the if(...) wrapper and keep the block body intact at the same
scope.

In @crates/biome_js_formatter/src/lib.rs:
- Around line 362-364: The condition currently uses logical OR (||) which
short-circuits and prevents is_global_suppressed from running its side effects;
change the operator in the if condition that calls is_suppressed and
is_global_suppressed to the bitwise OR (|) so both methods are always evaluated
(ensuring mark_suppression_checked runs in each). Locate the if using
is_suppressed(node, f) || is_global_suppressed(node, f) and replace the || with
|, keeping the surrounding write!(f, [format_suppressed_node(node.syntax())])
logic intact.

In @crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js:
- Around line 1-5: Rename the test file named "globa_suppression.js" to
"global_suppression.js" to fix the typo; update any references to this filename
(tests, imports, or test suite entries) to use "global_suppression.js" so the
test runner and other files remain consistent with the global suppression
naming.

In
@crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new:
- Around line 1-47: Snapshot filename contains a typo ("globa_suppression" →
"global_suppression") and the snapshot content is missing a trailing newline
before the closing triple backticks; rename the snapshot to use
"global_suppression" and edit the snapshot content so the last lines end with
the function line followed by a newline and the closing ``` marker (i.e., ensure
the output ends with `function name() { return "    "     };` then a newline,
then the closing triple backticks).

In @crates/biome_json_formatter/src/lib.rs:
- Line 189: The condition in the if uses a bitwise OR: change the expression "if
self.is_suppressed(node, f) | self.is_global_suppressed(node, f)" to use logical
OR with short-circuiting ("||") so it becomes "if self.is_suppressed(node, f) ||
self.is_global_suppressed(node, f)"; update the same occurrence within the
relevant method in lib.rs to match the YAML formatter's behavior.

In @crates/biome_yaml_formatter/src/comments.rs:
- Around line 69-82: The guard checking node.text_range_with_trivia().start() >=
TextSize::from(0) is always true and should be removed; delete that condition
and its surrounding if so the code directly computes has_global_suppression and
root, then uses if let Some(root) = root && has_global_suppression { return
CommentPlacement::leading(root.syntax().clone(), comment); } — i.e., unindent
the block and eliminate the dead TextSize comparison while keeping the existing
logic that inspects node.first_leading_trivia(), finds the YamlRoot via
node.ancestors().find_map(YamlRoot::cast), and returns the leading placement
when both conditions hold.
🧹 Nitpick comments (1)
crates/biome_formatter/src/comments.rs (1)

938-951: Minor: Condition is always true.TextSize wraps a raw u32, so the condition start >= TextSize::from(0) is always true for any valid TextSize value. This appears to be defensive programming copied across all formatters - not harmful, but does nothing. Given it's consistent across all formatters, I'd leave it as a very minor nit.

📜 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 46f33a7 and fa1d693.

⛔ Files ignored due to path filters (5)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css.snap is excluded by !**/*.snap and included by **
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (28)
  • .changeset/proud-ends-hear.md
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
  • crates/biome_formatter/src/comments.rs
  • crates/biome_formatter/src/comments/builder.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_js_formatter/src/comments.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_yaml_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
🧰 Additional context used
📓 Path-based instructions (3)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use the dbg!() macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_js_formatter/src/comments.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_formatter/src/comments.rs
  • crates/biome_formatter/src/comments/builder.rs
  • crates/biome_yaml_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
**/Cargo.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/Cargo.toml: Use workspace dependencies with workspace = true for internal crates in Cargo.toml
Use path dependencies for dev-dependencies in crates to avoid requiring published versions

Files:

  • crates/biome_grit_formatter/Cargo.toml
crates/biome_js_formatter/**/*.rs

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

crates/biome_js_formatter/**/*.rs: Import the FormatNode trait and implement it for your Node when creating formatters in biome_js_formatter
When formatting AST nodes, use mandatory tokens from the AST instead of hardcoding token strings (e.g., use node.l_paren_token().format() instead of token("("))
For tokens that are not mandatory, use helper functions instead of hardcoding
Do not attempt to 'fix' the code; if a token/node is known to be mandatory but is missing, return None instead
Use the dbg_write! macro to debug formatter output instead of other logging methods

Files:

  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_js_formatter/src/comments.rs
🧠 Learnings (57)
📓 Common learnings
Learnt from: dyc3
Repo: biomejs/biome PR: 8291
File: crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/elastic-header.html:10-10
Timestamp: 2025-12-04T13:29:49.287Z
Learning: Files under `crates/biome_html_formatter/tests/specs/prettier` are test fixtures synced from Prettier and should not receive detailed code quality reviews (e.g., HTTP vs HTTPS, formatting suggestions, etc.). These files are test data meant to validate formatter behavior and should be preserved as-is.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/context.rs : Define `<Language>FormatContext` struct in a `context.rs` file containing `comments` and `source_map` fields, implementing `FormatContext` and `CstFormatContext` traits
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/comments.rs : Define `<Language>CommentStyle` as a public type alias for `Comments<<Language>Language>` in a `comments.rs` file
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/*.ungram : Add a legend comment to `.ungram` files explaining the grammar syntax including comments, non-terminals, tokens, sequences, alternations, repetitions, and optional elements
📚 Learning: 2025-12-04T13:29:49.287Z
Learnt from: dyc3
Repo: biomejs/biome PR: 8291
File: crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/elastic-header.html:10-10
Timestamp: 2025-12-04T13:29:49.287Z
Learning: Files under `crates/biome_html_formatter/tests/specs/prettier` are test fixtures synced from Prettier and should not receive detailed code quality reviews (e.g., HTTP vs HTTPS, formatting suggestions, etc.). These files are test data meant to validate formatter behavior and should be preserved as-is.

Applied to files:

  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/tests/specs/**/* : Create test files with `invalid` and `valid` prefixes to represent code that should and should not trigger the rule

Applied to files:

  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/spec_tests.rs : Use the `tests_macros::gen_tests!` macro in `spec_tests.rs` to generate test functions for each specification file matching the pattern `tests/specs/<language>/**/*.<ext>`

Applied to files:

  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/specs/**/options.json : Create an `options.json` file (formatted as `biome.json`) in test specification folders to apply non-default formatting options to all test files in that folder

Applied to files:

  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/Cargo.toml : Include development dependencies in `Cargo.toml` for formatter tests: `biome_formatter_test`, `biome_<language>_factory`, `biome_<language>_parser`, `biome_parser`, `biome_service`, `countme`, `iai`, `quickcheck`, `quickcheck_macros`, and `tests_macros`

Applied to files:

  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql
  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/language.rs : Implement `TestFormatLanguage` trait in `tests/language.rs` for the formatter's test language

Applied to files:

  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_formatter/src/comments/builder.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
  • crates/biome_yaml_formatter/src/comments.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/tests/specs/**/* : Test snapshot output files must be placed in `tests/specs/` folder with subfolders matching the rule group and rule name

Applied to files:

  • crates/biome_html_formatter/tests/specs/html/suppressions/global_suppression.html
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/*.ungram : Add a legend comment to `.ungram` files explaining the grammar syntax including comments, non-terminals, tokens, sequences, alternations, repetitions, and optional elements

Applied to files:

  • .changeset/proud-ends-hear.md
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/comments.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:

  • .changeset/proud-ends-hear.md
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/tests/specs/**/*.jsonc : Use `.jsonc` format for test files containing multiple code snippets, where each snippet is a string in an array

Applied to files:

  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/tests/specs/json/global_suppression.jsonc
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_grit_formatter/tests/specs/grit/global_suppression.grit
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/comments.rs : Define `<Language>CommentStyle` as a public type alias for `Comments<<Language>Language>` in a `comments.rs` file

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_js_formatter/src/comments.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_formatter/src/comments.rs
  • crates/biome_formatter/src/comments/builder.rs
  • crates/biome_yaml_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/context.rs : Define `<Language>FormatContext` struct in a `context.rs` file containing `comments` and `source_map` fields, implementing `FormatContext` and `CstFormatContext` traits

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_js_formatter/src/comments.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_formatter/src/comments.rs
  • crates/biome_formatter/src/comments/builder.rs
  • crates/biome_yaml_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Define `FormatHtmlSyntaxNode` struct in a `cst.rs` file implementing `FormatRule<HtmlSyntaxNode>`, `AsFormat<HtmlFormatContext>`, and `IntoFormat<HtmlFormatContext>` traits using the provided boilerplate code

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_css_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/lib.rs : Expose a public `format_node` function that accepts formatting options and a root syntax node, returning a `FormatResult<Formatted<Context>>` with appropriate documentation

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import the `FormatNode` trait and implement it for your Node when creating formatters in biome_js_formatter

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_js_formatter/src/comments.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_yaml_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/src/**/*.rs : Use `ConditionalParsedSyntax` for syntax that is only valid in specific contexts (e.g., strict mode, file types, language versions) and call `or_invalid_to_bogus()` to convert to a bogus node if not supported

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/*.ungram : Nodes for enclosing syntax errors must have the `Bogus` word, e.g., `HtmlBogusAttribute`, and must be part of a variant

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Use `Markup!` macro for diagnostic messages and code action descriptions to ensure proper formatting

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : When formatting AST nodes, use mandatory tokens from the AST instead of hardcoding token strings (e.g., use `node.l_paren_token().format()` instead of `token("(")`)

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_js_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/*.ungram : All grammar nodes must start with the prefix of the language, e.g., `HtmlSimpleAttribute`

Applied to files:

  • crates/biome_html_formatter/src/comments.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Deprecated rules must include a `deprecated` field in the `declare_lint_rule!` macro with an explanation of what rule to use instead

Applied to files:

  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Applies to **/Cargo.toml : Use workspace dependencies with `workspace = true` for internal crates in Cargo.toml

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Applies to crates/biome_service/src/workspace*.rs : Implement the Workspace trait in the Biome Service to manage internal state of projects, including open documents, project layout instances, and module graph instances

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-11-24T18:04:57.309Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:57.309Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register all new diagnostic categories in crates/biome_diagnostics_categories/src/categories.rs

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_css_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Create two new crates `biome_{language}_syntax` and `biome_{language}_factory` using `cargo new --lib` for new language parsers

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Applies to **/Cargo.toml : Use path dependencies for dev-dependencies in crates to avoid requiring published versions

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-11-24T18:04:57.309Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:57.309Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Use helper types from the biome_diagnostics::v2 module (CodeFrameAdvice, CommandAdvice, DiffAdvice, LogAdvice) or implement the Advices trait yourself for custom advice handling

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Implement watcher tests for workspace methods in watcher.tests.rs and end-to-end tests in LSP tests

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_json_formatter/tests/prettier_tests.rs
📚 Learning: 2025-11-24T18:04:57.309Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:57.309Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Implement the Diagnostic trait on types, or use the #[derive(Diagnostic)] procedural macro to implement the trait. Configure category, severity, description, message, location, and tags using the #[diagnostic] attribute

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_css_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:04:57.309Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:57.309Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Ensure the type implementing Diagnostic derives Debug

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Build debug binaries using `cargo build --bin biome` for development and triaging

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Use the `just gen-formatter` command to generate initial formatter implementations from the grammar, which will use `format_verbatim_node` that must be replaced with proper `biome_formatter` utilities

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-11-24T18:06:12.048Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:12.048Z
Learning: Debug the WorkspaceWatcher by starting the daemon with cargo run --bin=biome -- start and running commands such as cargo run --bin=biome -- lint --use-server <path>

Applied to files:

  • crates/biome_grit_formatter/Cargo.toml
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Implement the `FormatNodeRule<N>` trait with `fmt_fields` as the only required method; default implementations of `fmt`, `is_suppressed`, `fmt_leading_comments`, `fmt_dangling_comments`, and `fmt_trailing_comments` are provided

Applied to files:

  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Check if a variable is global using the semantic model before reporting diagnostics for rules that ban global functions or variables

Applied to files:

  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: The formatter foundation relies on using the generic `Format` trait and `FormatNode` for nodes, with creation of an intermediate IR via a series of helpers

Applied to files:

  • crates/biome_grit_formatter/src/lib.rs
  • crates/biome_graphql_formatter/src/lib.rs
  • crates/biome_json_formatter/src/lib.rs
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Invalid code snippets in rule documentation must emit exactly one diagnostic

Applied to files:

  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : The first paragraph of rule documentation must be written in a single line to ensure proper rendering in the rules overview table

Applied to files:

  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_html_formatter/src/lib.rs
  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Do not attempt to 'fix' the code; if a token/node is known to be mandatory but is missing, return `None` instead

Applied to files:

  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_graphql_formatter/src/verbatim.rs
  • crates/biome_js_formatter/src/lib.rs
  • crates/biome_graphql_formatter/tests/specs/graphql/suppression.graphql.snap.new
  • crates/biome_json_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use the `dbg_write!` macro to debug formatter output instead of other logging methods

Applied to files:

  • crates/biome_js_formatter/tests/specs/js/module/globa_suppression.js.snap.new
  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/lib.rs : Define a type alias `<Language>Formatter<'buf>` as `Formatter<'buf, <Language>FormatContext>` in the main formatter crate

Applied to files:

  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Implement the `FormatLanguage` trait with `SyntaxLanguage`, `Context`, and `FormatRule` associated types for the language's formatter

Applied to files:

  • crates/biome_json_formatter/src/comments.rs
  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_yaml_formatter/src/comments.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Use `rule_category!()` macro to refer to the diagnostic category instead of dynamically parsing its string name

Applied to files:

  • crates/biome_css_formatter/src/comments.rs
  • crates/biome_grit_formatter/src/comments.rs
  • crates/biome_graphql_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : For tokens that are not mandatory, use helper functions instead of hardcoding

Applied to files:

  • crates/biome_css_formatter/src/comments.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Code blocks in rule documentation must specify a language identifier and be tagged with `expect_diagnostic` for invalid examples or remain untagged for valid examples

Applied to files:

  • crates/biome_graphql_formatter/src/comments.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/biome_rule_options/lib/**/*.rs : Apply `#[serde(rename_all = "camelCase")]` to rule option structs to match JSON configuration naming convention

Applied to files:

  • crates/biome_json_formatter/tests/prettier_tests.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Create specification test files in `tests/specs/<language>/` directories with one or more test files; use `cargo insta accept` or `cargo insta review` to accept/reject snapshots

Applied to files:

  • crates/biome_json_formatter/tests/prettier_tests.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Create test infrastructure with `tests/specs` folder structure and `spec_test.rs`, `spec_tests.rs`, and `language.rs` files in test directories

Applied to files:

  • crates/biome_json_formatter/tests/prettier_tests.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Applies to **/*.rs : Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Applied to files:

  • crates/biome_json_formatter/tests/prettier_tests.rs
  • crates/biome_formatter/src/comments/builder.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: Applies to **/*.rs : Use the `dbg!()` macro for debugging output in Rust tests and code

Applied to files:

  • crates/biome_json_formatter/tests/prettier_tests.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/biome_rule_options/lib/**/*.rs : Rule options must be defined in the `biome_rule_options` crate with a file named after the rule

Applied to files:

  • crates/biome_css_formatter/tests/specs/css/global_suppression.css
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/language_kind.rs : Add a new language prefix to the `LANGUAGE_PREFIXES` constant in `language_kind.rs` file

Applied to files:

  • crates/biome_yaml_formatter/src/comments.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Create a new formatter crate using the command `just new-crate biome_<language>_formatter` where `<language>` is the target language (e.g., `biome_html_formatter` for HTML)

Applied to files:

  • crates/biome_yaml_formatter/src/comments.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : New rules must be placed inside the `nursery` group before promotion to other groups

Applied to files:

  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Use `declare_lint_rule!` macro with a `version` field set to `next` for new rules

Applied to files:

  • crates/biome_yaml_formatter/src/lib.rs
📚 Learning: 2026-01-02T14:58:16.536Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2026-01-02T14:58:16.536Z
Learning: Applies to crates/biome_analyze/**/*_analyze/**/src/lint/**/*.rs : Rule names should use the `no` prefix when the rule's sole intention is to forbid a single concept

Applied to files:

  • crates/biome_yaml_formatter/src/lib.rs
🧬 Code graph analysis (14)
crates/biome_html_formatter/src/comments.rs (3)
crates/biome_analyze/src/matcher.rs (1)
  • parse_suppression_comment (374-393)
crates/biome_formatter/src/comments.rs (7)
  • is_global_suppression (771-773)
  • trailing (742-747)
  • leading (725-730)
  • dangling (733-738)
  • from (460-469)
  • piece (178-180)
  • piece (283-285)
crates/biome_js_formatter/src/comments.rs (2)
  • is_global_suppression (88-94)
  • handle_global_suppression (1378-1399)
crates/biome_grit_formatter/src/lib.rs (7)
crates/biome_css_formatter/src/lib.rs (1)
  • is_global_suppressed (211-213)
crates/biome_formatter/src/comments.rs (1)
  • is_global_suppressed (938-951)
crates/biome_graphql_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_html_formatter/src/lib.rs (1)
  • is_global_suppressed (256-258)
crates/biome_js_formatter/src/lib.rs (1)
  • is_global_suppressed (418-420)
crates/biome_json_formatter/src/lib.rs (1)
  • is_global_suppressed (207-209)
crates/biome_yaml_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_graphql_formatter/src/lib.rs (7)
crates/biome_css_formatter/src/lib.rs (1)
  • is_global_suppressed (211-213)
crates/biome_formatter/src/comments.rs (1)
  • is_global_suppressed (938-951)
crates/biome_grit_formatter/src/lib.rs (1)
  • is_global_suppressed (100-102)
crates/biome_html_formatter/src/lib.rs (1)
  • is_global_suppressed (256-258)
crates/biome_js_formatter/src/lib.rs (1)
  • is_global_suppressed (418-420)
crates/biome_json_formatter/src/lib.rs (1)
  • is_global_suppressed (207-209)
crates/biome_yaml_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_js_formatter/src/lib.rs (6)
crates/biome_css_formatter/src/lib.rs (1)
  • is_global_suppressed (211-213)
crates/biome_formatter/src/comments.rs (1)
  • is_global_suppressed (938-951)
crates/biome_grit_formatter/src/lib.rs (1)
  • is_global_suppressed (100-102)
crates/biome_html_formatter/src/lib.rs (1)
  • is_global_suppressed (256-258)
crates/biome_json_formatter/src/lib.rs (1)
  • is_global_suppressed (207-209)
crates/biome_yaml_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_css_formatter/src/lib.rs (2)
crates/biome_formatter/src/comments.rs (1)
  • is_global_suppressed (938-951)
crates/biome_js_formatter/src/lib.rs (1)
  • is_global_suppressed (418-420)
crates/biome_json_formatter/src/lib.rs (6)
crates/biome_css_formatter/src/lib.rs (1)
  • is_global_suppressed (211-213)
crates/biome_formatter/src/comments.rs (1)
  • is_global_suppressed (938-951)
crates/biome_grit_formatter/src/lib.rs (1)
  • is_global_suppressed (100-102)
crates/biome_html_formatter/src/lib.rs (1)
  • is_global_suppressed (256-258)
crates/biome_js_formatter/src/lib.rs (1)
  • is_global_suppressed (418-420)
crates/biome_yaml_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_json_formatter/src/comments.rs (2)
crates/biome_formatter/src/comments/builder.rs (1)
  • is_global_suppression (1062-1064)
crates/biome_js_formatter/src/comments.rs (2)
  • is_global_suppression (88-94)
  • handle_global_suppression (1378-1399)
crates/biome_html_formatter/src/lib.rs (7)
crates/biome_css_formatter/src/lib.rs (1)
  • is_global_suppressed (211-213)
crates/biome_formatter/src/comments.rs (1)
  • is_global_suppressed (938-951)
crates/biome_graphql_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_grit_formatter/src/lib.rs (1)
  • is_global_suppressed (100-102)
crates/biome_js_formatter/src/lib.rs (1)
  • is_global_suppressed (418-420)
crates/biome_json_formatter/src/lib.rs (1)
  • is_global_suppressed (207-209)
crates/biome_yaml_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_js_formatter/src/comments.rs (4)
crates/biome_analyze/src/matcher.rs (1)
  • parse_suppression_comment (374-393)
crates/biome_css_formatter/src/comments.rs (2)
  • is_global_suppression (76-82)
  • handle_global_suppression (164-185)
crates/biome_formatter/src/comments.rs (5)
  • is_global_suppression (771-773)
  • from (460-469)
  • piece (178-180)
  • piece (283-285)
  • leading (725-730)
crates/biome_html_formatter/src/comments.rs (4)
  • is_global_suppression (49-55)
  • handle_global_suppression (121-142)
  • node (99-99)
  • node (103-103)
crates/biome_css_formatter/src/comments.rs (4)
crates/biome_formatter/src/comments.rs (5)
  • is_global_suppression (771-773)
  • from (460-469)
  • piece (178-180)
  • piece (283-285)
  • leading (725-730)
crates/biome_formatter/src/comments/builder.rs (1)
  • is_global_suppression (1062-1064)
crates/biome_graphql_formatter/src/comments.rs (2)
  • is_global_suppression (73-79)
  • handle_global_suppression (97-117)
crates/biome_yaml_formatter/src/comments.rs (2)
  • is_global_suppression (44-50)
  • handle_global_suppression (64-85)
crates/biome_graphql_formatter/src/comments.rs (3)
crates/biome_html_formatter/src/comments.rs (5)
  • is_global_suppression (49-55)
  • get_comment_kind (57-59)
  • handle_global_suppression (121-142)
  • node (99-99)
  • node (103-103)
crates/biome_json_formatter/src/comments.rs (3)
  • is_global_suppression (75-81)
  • get_comment_kind (83-93)
  • handle_global_suppression (127-148)
crates/biome_yaml_formatter/src/comments.rs (3)
  • is_global_suppression (44-50)
  • get_comment_kind (52-54)
  • handle_global_suppression (64-85)
crates/biome_json_formatter/tests/prettier_tests.rs (1)
crates/tests_macros/src/lib.rs (1)
  • gen_tests (305-312)
crates/biome_formatter/src/comments.rs (6)
crates/biome_css_formatter/src/comments.rs (2)
  • is_global_suppression (76-82)
  • is_suppression (68-74)
crates/biome_formatter/src/comments/builder.rs (2)
  • is_global_suppression (1062-1064)
  • is_suppression (1058-1060)
crates/biome_graphql_formatter/src/comments.rs (2)
  • is_global_suppression (73-79)
  • is_suppression (65-71)
crates/biome_html_formatter/src/comments.rs (2)
  • is_global_suppression (49-55)
  • is_suppression (41-47)
crates/biome_js_formatter/src/comments.rs (2)
  • is_global_suppression (88-94)
  • is_suppression (80-86)
crates/biome_yaml_formatter/src/comments.rs (2)
  • is_global_suppression (44-50)
  • is_suppression (36-42)
crates/biome_yaml_formatter/src/lib.rs (7)
crates/biome_css_formatter/src/lib.rs (1)
  • is_global_suppressed (211-213)
crates/biome_formatter/src/comments.rs (1)
  • is_global_suppressed (938-951)
crates/biome_graphql_formatter/src/lib.rs (1)
  • is_global_suppressed (205-207)
crates/biome_grit_formatter/src/lib.rs (1)
  • is_global_suppressed (100-102)
crates/biome_html_formatter/src/lib.rs (1)
  • is_global_suppressed (256-258)
crates/biome_js_formatter/src/lib.rs (1)
  • is_global_suppressed (418-420)
crates/biome_json_formatter/src/lib.rs (1)
  • is_global_suppressed (207-209)
⏰ 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). (23)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_formatter)

@ematipico ematipico added this to the Biome v2.4 milestone Jan 6, 2026
@ematipico ematipico merged commit d8f0309 into next Jan 6, 2026
28 checks passed
@ematipico ematipico deleted the feat/biome-ignore-all-formatter branch January 6, 2026 09:57
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter L-CSS Language: CSS L-Grit Language: GritQL L-HTML Language: HTML and super languages 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.

2 participants