Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 feat: promote lint rules by ematipico · Pull Request #7758 · biomejs/biome · GitHub
Nothing Special   »   [go: up one dir, main page]

Skip to content

Conversation

ematipico
Copy link
Member

Summary

  • removed useAnchorHref because we already have useValidAnchor (updated the sources of the rule)
  • moved noNonNullAssertedOptionalChain to the suspicious group
  • moved useReactFunctionComponents to the style group
  • moved useImageSize to correctness group
  • moved useConsistentTypeDefinitions to style group
  • moved useQwikClasslist to correctness group
  • moved noSecrets to security group

Test Plan

Updated the snapshots

Docs

N/A

@changeset-bot
Copy link
changeset-bot bot commented Oct 15, 2025

🦋 Changeset detected

Latest commit: cdd38c0

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 October 15, 2025 07:20
@coderabbitai
Copy link
Contributor
coderabbitai bot commented Oct 15, 2025

Walkthrough

This changeset promotes multiple lint rules into stable groups (suspicious, style, correctness, security), removes the useAnchorHref rule, raises severities for useImageSize, useQwikClasslist and no_qwik_use_visible_task to Error, updates EslintQwik documentation/URL mapping, and refines noEmptySource handling to treat EOF leading comments as non-empty when allowComments is enabled. Several nursery rules and tests were removed or relocated accordingly.

Possibly related PRs

Suggested reviewers

  • dyc3

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "feat: promote lint rules" accurately reflects the primary objective of the changeset. The PR consolidates the promotion of six lint rules to their appropriate groups (suspicious, style, correctness, security) and removes the redundant useAnchorHref rule. The title is concise, clear, and specific enough that a developer scanning the commit history would understand this involves lint rule reorganisation.
Description Check ✅ Passed The PR description is related to the changeset and describes the actual changes being made. It lists the removed rule (useAnchorHref), the rules being promoted to different groups, notes the test plan (snapshot updates), and confirms docs are not applicable. While fairly concise, it adequately conveys what was changed and why (removing redundancy and organising rules into appropriate categories).
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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/promote-rules-230

📜 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 cec9553 and 4505ec1.

⛔ Files ignored due to path filters (1)
  • crates/biome_js_analyze/tests/specs/correctness/noQwikUseVisibleTask/noQwikUseVisibleTask/invalid.js.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (1)
  • crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs
🧠 Learnings (2)
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Choose rule severity appropriately (error/warn/info); set severity in declare_lint_rule! only when deviating from default

Applied to files:

  • crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Tim
8000
estamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Use declare_lint_rule! with version set to "next" for every rule definition

Applied to files:

  • crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs
🧬 Code graph analysis (1)
crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs (1)
crates/biome_analyze/src/rule.rs (2)
  • severity (620-623)
  • severity (1286-1288)
⏰ 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: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Check Dependencies
  • GitHub Check: autofix
  • GitHub Check: lint
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Validate PR title
  • GitHub Check: triage
🔇 Additional comments (1)
crates/biome_js_analyze/src/lint/correctness/no_qwik_use_visible_task.rs (1)

40-40: Severity change aligns with correctness group guidance.

The explicit Severity::Error setting correctly implements the requirement that correctness rules should have error severity, as discussed in the PR comments.

Based on learnings.


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

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Oct 15, 2025
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: 2

📜 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 0086309 and 1c4e45b.

⛔ Files ignored due to path filters (28)
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_js_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_js_analyze/tests/specs/correctness/noQwikUseVisibleTask/noQwikUseVisibleTask/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/noQwikUseVisibleTask/noQwikUseVisibleTask/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-2.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-3.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-4.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/valid-2.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useQwikClasslist/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useQwikClasslist/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid-2.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useConsistentTypeDefinitions/invalidType.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid_entropy_high.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid_entropy_low.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/valid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useReactFunctionComponents/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useReactFunctionComponents/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noNonNullAssertedOptionalChain/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noNonNullAssertedOptionalChain/valid.ts.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (11)
  • .changeset/large-lands-brush.md (1 hunks)
  • crates/biome_analyze/src/rule.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/correctness.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/nursery/use_anchor_href.rs (0 hunks)
  • crates/biome_js_analyze/src/lint/security.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/style.rs (3 hunks)
  • crates/biome_js_analyze/src/lint/suspicious.rs (2 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/invalid.jsx (0 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid-2.jsx (0 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid.jsx (0 hunks)
💤 Files with no reviewable changes (4)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid-2.jsx
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid.jsx
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/invalid.jsx
  • crates/biome_js_analyze/src/lint/nursery/use_anchor_href.rs
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/**/*.md: Create changesets using the just new-changeset command; do not author them manually
In changeset markdown, only use headers #### or #####
Changeset descriptions must end every sentence with a full stop (.)
For bug fixes, start the changeset description with a linked issue reference like “Fixed #1234
Prefer past tense for what was done and present tense for current behavior in changesets

Files:

  • .changeset/large-lands-brush.md
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_analyze/src/rule.rs
  • crates/biome_js_analyze/src/lint/correctness.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/security.rs
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
  • crates/biome_js_analyze/src/lint/suspicious.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Before committing, format Rust and TOML files (e.g., via just f/just format)

Files:

  • crates/biome_analyze/src/rule.rs
  • crates/biome_js_analyze/src/lint/correctness.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/security.rs
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
  • crates/biome_js_analyze/src/lint/suspicious.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Document rules, assists, and options via inline rustdoc in Rust source

Files:

  • crates/biome_analyze/src/rule.rs
  • crates/biome_js_analyze/src/lint/correctness.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/security.rs
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
  • crates/biome_js_analyze/src/lint/suspicious.rs
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_analyze/src/lint/correctness.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/security.rs
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
  • crates/biome_js_analyze/src/lint/suspici 8000 ous.rs
🧠 Learnings (3)
📚 Learning: 2025-10-02T12:57:33.228Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:57:33.228Z
Learning: Applies to crates/biome_analyze/crates/biome_js_analyze/lib/src/lint/nursery/*.rs : Place all new JavaScript lint rules in the nursery group under biome_js_analyze/lib/src/lint/nursery/<rule_name>.rs

Applied to files:

  • crates/biome_js_analyze/src/lint/correctness.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/suspicious.rs
📚 Learning: 2025-10-02T12:57:33.228Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:57:33.228Z
Learning: If porting a rule from another ecosystem, annotate sources in declare_lint_rule! (e.g., sources: &[RuleSource::Eslint("no-debugger").{same|inspired}()])

Applied to files:

  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
📚 Learning: 2025-10-02T12:57:33.228Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:57:33.228Z
Learning: Applies to crates/biome_analyze/crates/**/src/**/lint/**/*.rs : In declare_lint_rule! blocks, set version: "next" for all rules

Applied to files:

  • crates/biome_js_analyze/src/lint/suspicious.rs
🧬 Code graph analysis (5)
crates/biome_js_analyze/src/lint/correctness.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • Correctness (1381-1646)
crates/biome_js_analyze/src/lint/style.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • Style (1885-2174)
crates/biome_js_analyze/src/lint/security.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • Security (1860-1881)
crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs (1)
crates/biome_analyze/src/rule.rs (2)
  • sources (610-613)
  • same (246-251)
crates/biome_js_analyze/src/lint/suspicious.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • Suspicious (2178-2559)
🪛 LanguageTool
.changeset/large-lands-brush.md

[formatting] ~13-~13: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...p Removed the lint rule useAnchorHref, because its use case is covered by `useValidAnc...

(COMMA_BEFORE_BECAUSE)

⏰ 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). (8)
  • GitHub Check: autofix
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_analyze)
🔇 Additional comments (6)
crates/biome_analyze/src/rule.rs (1)

150-150: LGTM! Documentation updated to reflect correct GitHub organisation.

crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs (1)

80-80: LGTM! Additional rule source correctly added.

The EslintQwik source broadens the rule coverage as intended by the PR.

Based on learnings

crates/biome_js_analyze/src/lint/suspicious.rs (1)

54-54: LGTM! NoNonNullAssertedOptionalChain correctly promoted to suspicious group.

The module and group registration follow the established pattern.

Also applies to: 88-88

crates/biome_js_analyze/src/lint/style.rs (1)

42-42: LGTM! Both rules correctly promoted to style group.

UseConsistentTypeDefinitions and UseReactFunctionComponents are properly added.

Also applies to: 63-63, 75-75

crates/biome_js_analyze/src/lint/security.rs (1)

10-10: LGTM! NoSecrets correctly promoted to security group.

The module and group registration follow the established pattern.

Also applies to: 11-11

crates/biome_js_analyze/src/lint/correctness.rs (1)

25-25: LGTM! Three rules correctly promoted to correctness group.

NoQwikUseVisibleTask, UseImageSize, and UseQwikClasslist are properly added.

Also applies to: 49-49, 55-55, 61-61

Self::EslintN(rule_name) => format!("https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/{rule_name}.md"),
Self::EslintNext(rule_name) => format!("https://nextjs.org/docs/messages/{rule_name}"),
Self::EslintQwik(rule_name) => format!("https://github.com/BuilderIO/eslint-plugin-qwik/blob/main/docs/rules/{rule_name}.md"),
Self::EslintQwik(rule_name) => format!("https://github.com/QwikDev/qwik/tree/main/packages/eslint-plugin-qwik/blob/main/docs/rules/{rule_name}.md"),
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix the malformed GitHub URL pattern.

The URL contains both /tree/main/ and /blob/main/, which will result in a 404 error. GitHub URLs use either one or the other, not both.

Apply this diff to fix the URL pattern:

-            Self::EslintQwik(rule_name) => format!("https://github.com/QwikDev/qwik/tree/main/packages/eslint-plugin-qwik/blob/main/docs/rules/{rule_name}.md"),
+            Self::EslintQwik(rule_name) => format!("https://github.com/QwikDev/qwik/blob/main/packages/eslint-plugin-qwik/docs/rules/{rule_name}.md"),
📝 Committable suggestion

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

Suggested change
Self::EslintQwik(rule_name) => format!("https://github.com/QwikDev/qwik/tree/main/packages/eslint-plugin-qwik/blob/main/docs/rules/{rule_name}.md"),
Self::EslintQwik(rule_name) => format!("https://github.com/QwikDev/qwik/blob/main/packages/eslint-plugin-qwik/docs/rules/{rule_name}.md"),
🤖 Prompt for AI Agents
In crates/biome_analyze/src/rule.rs around line 373, the GitHub URL incorrectly
includes both /tree/main/ and /blob/main/, causing a 404; change the URL to use
only /blob/main/ (remove the /tree/main part) so it becomes
"https://github.com/QwikDev/qwik/bl
8000
ob/main/packages/eslint-plugin-qwik/docs/rules/{rule_name}.md".

@github-actions github-actions bot added A-CLI Area: CLI A-Project Area: project labels Oct 15, 2025
@codspeed-hq
Copy link
codspeed-hq bot commented Oct 15, 2025

CodSpeed Performance Report

Merging #7758 will not alter performance

Comparing feat/promote-rules-230 (cdd38c0) with next (63cb7ff)

Summary

✅ 53 untouched
⏩ 85 skipped1

Footnotes

  1. 85 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.

@Conaclos
Copy link
Member
Conaclos commented Oct 15, 2025

I've noticed you didn't update the severity level of the rules moved to correctness and security. Is this expected? Do you think some rules could be set to errors?

@ematipico
Copy link
Member Author

I simply forgot about it :) thank you for catching it

@ematipico
Copy link
Member Author

In noticed you didn't update the severity level of the rules moved to correctness and security. Is this expected? Do you think some rules could be set to errors?

There's a problem, we have a bunch of rules that don't have the correct severity 😅

The rule 'noGlobalDirnameFilename' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noNodejsModules' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noPrivateImports' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noProcessGlobal' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noQwikUseVisibleTask' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noReactPropAssignments' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noRestrictedElements' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noSolidDestructuredProps' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noUnusedFunctionParameters' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noUnusedImports' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noUnusedLabels' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noUnusedPrivateClassMembers' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'noUnusedVariables' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'useImageSize' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'useImportExtensions' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'useJsonImportAttributes' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'useParseIntRadix' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'useQwikClasslist' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.
The rule 'useSingleJsDocAsterisk' that belongs to the group 'correctness' must have Severity::Error. Increase the severity or change the group.

@ematipico
Copy link
Member Author

It makes me question why some rules are under the correctness group e.g.: useSingleJsDocAsterisk, noProcessGlobal, etc.

@Conaclos
Copy link
Member
Conaclos commented Oct 15, 2025

There's a problem, we have a bunch of rules that don't have the correct severity 😅

It makes me question why some rules are under the correctness group e.g.: useSingleJsDocAsterisk, noProcessGlobal, etc.

We discussed it on Discord before the 2.0 release. We agreed that making it consistent could require too many chnages. Thus, I tried to make the most important changes to ensure some consistency.

Here some decisions I/we made:

  • (new) correctness, security, and a11y rules must be errorr
    For legacy reason, we have some correctness rules that are warn.
    If error is too strict for a rule, then it should certainly be in another group (for example suspicious instead of correctness).
    Perhaps, we could consider relaxing it for a11y and allow warn in a11y.
  • style rules must be info or warn. If in doubt, use info
  • complexity rules must be warn or info. If in doubt, use info
  • suspicious rules must be warn or error. If in doubt, use warn
  • performance rules must be warn

I think I documented it somewhere. Perhaps on the website as an informal rule of thumbs.

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

📜 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 00c6205 and d77a6e1.

⛔ Files ignored due to path filters (7)
  • crates/biome_cli/tests/snapshots/main_commands_format/html_disabled_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/html_enabled_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-2.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-3.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-4.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useQwikClasslist/invalid.jsx.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (5)
  • crates/biome_analyze/src/rule.rs (2 hunks)
  • crates/biome_cli/tests/commands/format.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs (1 hunks)
  • crates/biome_js_analyze/tests/spec_tests.rs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs
  • crates/biome_analyze/src/rule.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs
  • crates/biome_cli/tests/commands/format.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs
  • crates/biome_analyze/src/rule.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs
  • crates/biome_cli/tests/commands/format.rs
**/tests/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files under a tests/ directory in each crate

Files:

  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_cli/tests/commands/format.rs
🧠 Learnings (11)
📚 Learning: 2025-10-15T09:20:19.126Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.126Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Choose rule severity appropriately (error/warn/info); set severity in declare_lint_rule! only when deviating from default

Applied to files:

  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs
  • crates/biome_analyze/src/rule.rs
  • crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs
📚 Learning: 2025-10-15T09:20:19.126Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.126Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Documentation for rules must have a single-line first paragraph, include ## Examples with ### Invalid then ### Valid, and document options under ## Options with properly marked code blocks
<
8000
/code>

Applied to files:

  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs
  • crates/biome_analyze/src/rule.rs
📚 Learning: 2025-10-15T09:20:19.126Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.126Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : If a lint rule is ported or inspired by another linter, add sources metadata in declare_lint_rule! with RuleSource (use .same() or .inspired())

Applied to files:

  • crates/biome_analyze/src/rule.rs
📚 Learning: 2025-10-15T09:20:19.126Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.126Z
Learning: Applies to crates/biome_analyze/**/tests/quick_test.rs : Use the quick test at biome_js_analyze/tests/quick_test.rs by un-ignoring and adjusting SOURCE and RuleFilter for ad-hoc checks

Applied to files:

  • crates/biome_analyze/src/rule.rs
📚 Learning: 2025-10-15T09:20:19.126Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.126Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Use RuleDomain(s) only when applicable and list them in declare_lint_rule! domains; recommended rules with domains are enabled based on manifest detection

Applied to files:

  • crates/biome_analyze/src/rule.rs
📚 Learning: 2025-10-15T09:20:19.126Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.126Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Use declare_lint_rule! with version set to "next" for every rule definition

Applied to files:

  • crates/biome_analyze/src/rule.rs
📚 Learning: 2025-10-15T09:22:15.838Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.838Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • crates/biome_js_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.838Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.838Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-10-15T09:22:15.838Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.838Z
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_cli/tests/commands/format.rs
📚 Learning: 2025-10-15T09:22:15.838Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.838Z
Learning: Applies to crates/biome_formatter/tests/specs/html/**/*.html : Place HTML test cases under tests/specs/html as .html files discovered by the test macro

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-08-17T08:55:30.118Z
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T08:55:30.118Z
Learning: Applies to crates/biome_html_formatter/benches/html_formatter.rs : Maintain the HTML formatter benchmark at benches/html_formatter.rs within the biome_html_formatter crate

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
🧬 Code graph analysis (4)
crates/biome_js_analyze/src/lint/correctness/use_image_size.rs (1)
crates/biome_analyze/src/rule.rs (2)
  • severity (620-623)
  • severity (1286-1288)
crates/biome_js_analyze/tests/spec_tests.rs (1)
crates/biome_formatter_test/src/spec.rs (1)
  • input_code (95-97)
crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs (1)
crates/biome_analyze/src/rule.rs (2)
  • severity (620-623)
  • severity (1286-1288)
crates/biome_cli/tests/commands/format.rs (1)
crates/biome_cli/tests/snap_test.rs (1)
  • assert_cli_snapshot (407-409)
⏰ 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). (11)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
🔇 Additional comments (6)
crates/biome_cli/tests/commands/format.rs (1)

3419-3441: Test correctly reflects HTML formatter now disabled by default.

The changes are internally consistent and technically sound. However, this HTML formatter behaviour change appears unrelated to the PR's objective of promoting lint rules. Was this intentional for this PR?

crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs (1)

34-34: LGTM! Severity correctly set for correctness group.

The severity change to Error aligns with the project's guideline that correctness rules must have Error severity.

crates/biome_js_analyze/tests/spec_tests.rs (1)

136-136: LGTM! Type correction.

Removes the unnecessary double reference since input_code is already shadowed to &str on line 128.

crates/biome_js_analyze/src/lint/correctness/use_image_size.rs (2)

11-14: LGTM! Documentation improvement.

The added explanation about layout shifts and user experience clearly justifies the rule's importance.


51-51: LGTM! Severity correctly set for correctness group.

The severity change to Error aligns with the project's guideline that correctness rules must have Error severity.

crates/biome_analyze/src/rule.rs (1)

150-150: LGTM!

Documentation correctly updated to reference the current QwikDev repository.

@ematipico
Copy link
Member Author

I think I documented it somewhere. Perhaps on the website as an informal rule of thumbs.

Can you please look for this information and make it more formal?

  • Contribution guide
  • Website
  • Update rules_check to emit errors if we break the rules

@github-actions github-actions bot added the L-JSON Language: JSON and super languages label Oct 15, 2025
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

📜 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 d77a6e1 and f8eec9d.

⛔ Files ignored due to path filters (11)
  • crates/biome_cli/tests/snapshots/main_commands_lint/linter_shows_the_default_severity_of_rule_on.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_configuration/incorrect_rule_name.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid-with-trivia.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid.cjs.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalidClass.cjs.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalidFunction.cjs.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalidFunction.js.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (6)
  • .changeset/public-experts-change.md (1 hunks)
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs (2 hunks)
  • crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid-with-trivia.js (1 hunks)
  • crates/biome_json_analyze/src/lint/nursery/no_empty_source.rs (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • crates/biome_json_analyze/src/lint/nursery/no_empty_source.rs
  • .changeset/public-experts-change.md
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
🧰 Additional context used
📓 Path-based instructions (4)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid-with-trivia.js
  • crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs
  • crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid-with-trivia.js
  • crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs
  • crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
**/tests/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files under a tests/ directory in each crate

Files:

  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid-with-trivia.js
  • crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs
🧬 Code graph analysis (1)
crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs (1)
crates/biome_js_factory/src/generated/node_factory.rs (1)
  • js_directive (849-854)
🔇 Additional comments (4)
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx (2)

1-19: Test structure looks appropriate.

The fixture correctly covers elements with implicit generic role per HTML AAM, suitable for testing redundant role assignments.


9-11: No change needed for <div open>
This mirrors the WPT source (roles-generic.html includes <div open>), so the edge-case test is intentional.

crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid-with-trivia.js (1)

1-7: LGTM!

The test fixture appropriately exercises the trivia-preservation behaviour with a reference directive, multiple leading comments, a trailing comment, and subsequent code.

crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs (1)

5-5: LGTM!

The new imports support the updated trivia-preservation implementation in the action method.

Also applies to: 8-8

@github-actions github-actions bot added the L-CSS Language: CSS label Oct 15, 2025
@ematipico
Copy link
Member Author

@Netail

FYI, I removed the lint rule noEmptySource for JSON because by spec a JSON file can't be empty.

@Netail
Copy link
Member
Netail commented Oct 15, 2025

@Netail

FYI, I removed the lint rule noEmptySource for JSON because by spec a JSON file can't be empty.

Does Biome just skip that file entirely then? If not, the rule basically tries to make the file comply with the spec. And what about embedded into a markdown?

Also, the next branch supports HTML-ish languages. Should the rule perhaps also exist for html?

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

🧹 Nitpick comments (2)
crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs (2)

129-129: Prefer is_empty() over len() > 0.

For readability, consider using the idiomatic !is_empty() check:

-AnyJsStatement::JsBlockStatement(block) => block.statements().len() > 0,
+AnyJsStatement::JsBlockStatement(block) => !block.statements().is_empty(),

136-139: Consider replacing ? with .ok().is_some_and() for an explicit EOF check

The ?-based early return on eof_token().ok()? is used in JS, CSS and GraphQL to treat missing EOF as “no diagnostic.” Switching to node.eof_token().ok().is_some_and(|t| t.has_leading_comments()) is purely stylistic and optional.

📜 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 f8eec9d and 1a6d0dc.

⛔ Files ignored due to path filters (4)
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.graphql.snap is excluded by !**/*.snap and included by **
  • crates/biome_json_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/invalid/empty.json.snap is excluded by !**/*.snap and included by **
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/valid/object.json.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (8)
  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs (1 hunks)
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs (3 hunks)
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.graphql (1 hunks)
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.options.json (1 hunks)
  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs (1 hunks)
  • crates/biome_json_analyze/src/lint/nursery/no_empty_source.rs (0 hunks)
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/invalid/comment.jsonc (0 hunks)
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/valid/object.json (0 hunks)
💤 Files with no reviewable changes (3)
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/valid/object.json
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/invalid/comment.jsonc
  • crates/biome_json_analyze/src/lint/nursery/no_empty_source.rs
✅ Files skipped from review due to trivial changes (2)
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.graphql
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.options.json
🧰 Additional context used
📓 Path-based instructions (3)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
🧠 Learnings (1)
📚 Learning: 2025-10-15T09:20:19.126Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.126Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Documentation for rules must have a single-line first paragraph, include ## Examples with ### Invalid then ### Valid, and document options under ## Options with properly marked code blocks

Applied to files:

  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
⏰ 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). (19)
  • GitHub Check: autofix
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_analyze)
🔇 Additional comments (1)
crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs (1)

85-88: Good catch on EOF trivia.

This neatly covers the comment-only-on-EOF case and keeps the rule honest. Cheers.

Comment on lines +22 to 24
/// ```graphql,ignore
/// # Invalid comment
/// ```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Restore exercised doc examples.

Swapping these snippets to ignore (and dropping use_options) means the docs no longer prove the behaviour: the “Invalid” example stops asserting a diagnostic, and the “Valid” one no longer enables allowComments. Let’s keep the guide authoritative by running the snippets again with the right modifiers.

Apply this diff:

-/// ```graphql,ignore
-/// # Invalid comment
+/// ```graphql,expect_diagnostic
+/// # Invalid comment
@@
-/// ```graphql,ignore
-/// # Valid comment
+/// ```graphql,use_options
+/// # Valid comment

Also applies to: 62-64

🤖 Prompt for AI Agents
In crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs around lines
22-24 (and similarly 62-64), the doc examples were changed to use `ignore` and
dropped `use_options`, which stops the examples from exercising diagnostics and
options; restore the executable modifiers: change the first snippet to use
`graphql,expect_diagnostic` so the invalid example asserts a diagnostic, and
change the second to `graphql,use_options` so the valid example runs with
allowComments enabled; update only the snippet modifiers accordingly so the
examples are executed and continue to document the behavior.

@ematipico
Copy link
Member Author
ematipico commented Oct 16, 2025

@Netail

FYI, I removed the lint rule noEmptySource for JSON because by spec a JSON file can't be empty.

Does Biome just skip that file entirely then?

No, it emits a parsing error for an empty file.

If not, the rule basically tries to make the file comply with the spec.

Which spec though? Different languages have different specs :)

And what about embedded into a markdown?

If you mean the code inside code blocks of rule docs, I'm not sure what you're asking. What about what?

Also, the next branch supports HTML-ish languages. Should the rule perhaps also exist for html?

It could, yes!

@Netail
Copy link
Member
Netail commented Oct 16, 2025

If not, the rule basically tries to make the file comply with the spec.

Which spec though? Different languages have different specs :)

Trying to make the file comply with the official spec, requiring at least something in the json file. Instead of throwing a parsing error

And what about embedded into a markdown?

If you mean the code inside code blocks of rule docs, I'm not sure what you're asking. What about what?

I mean embedded json into markdown code blocks. Not specially the rules docs, any markdown (once markdown is implemented)

@ematipico ematipico requested review from Conaclos and dyc3 October 16, 2025 07:44
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

🧹 Nitpick comments (1)
crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json (1)

5-5: Align level with style guidance or confirm "on" support

For style rules, prefer info (or warn). If object form does not accept "on", switch to:

- "level": "on",
+ "level": "info",

Otherwise, please confirm the schema permits "level": "on".

Use the same script shared in the sibling comment to verify repo-wide usage and schema expectations.

Also applies to: 7-7

📜 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 67db916 and 13d8699.

⛔ Files ignored due to path filters (4)
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid_entropy_high.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid_entropy_low.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noRedundantUseStrict/invalid-with-trivia.js.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (2)
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json (1 hunks)
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
**/tests/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files under a tests/ directory in each crate

Files:

  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
🧠 Learnings (1)
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
PR: biomejs/biome#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_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
⏰ 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). (19)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_parser)
🔇 Additional comments (3)
crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json (2)

2-2: Schema path looks reasonable

Relative hop count matches directory depth. No concerns here.


5-5: No change needed: “on” is a valid level
The schema, tests and CHANGELOG consistently use "on" to enable rules with default severity—no replacement required.

Likely an incorrect or invalid review comment.

crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json (1)

2-2: Schema reference OK

Matches the generated configuration schema location; no action needed. Based on learnings

@ematipico
Copy link
Member Author

Trying to make the file comply with the official spec, requiring at least something in the json file. Instead of throwing a parsing error

Ah ok. In this case, the lint rule isn't needed then, because the parser does that already.

I mean embedded json into markdown code blocks. Not specially the rules docs, any markdown (once markdown is implemented)

Tomorrow's problem! 😆

@ematipico ematipico force-pushed the feat/promote-rules-230 branch from 13d8699 to 20cd1e3 Compare October 20, 2025 11:25
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: 2

♻️ Duplicate comments (2)
crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs (1)

22-24: Restore executable doc examples.

Changing these snippets to ignore removes the assertions—the "Invalid" example no longer proves a diagnostic is emitted, and the "Valid" example doesn't exercise allowComments. Restore expect_diagnostic on line 22 and use_options on line 62 to keep the docs executable and authoritative.

Also applies to: 62-64

.changeset/large-lands-brush.md (1)

13-13: Remove the comma before “because”.

Tiny grammar tweak for flow.

As per coding guidelines.

-Removed the lint rule `useAnchorHref`, because its use case is covered by `useValidAnchor`.
+Removed the lint rule `useAnchorHref` because its use case is covered by `useValidAnchor`.
🧹 Nitpick comments (2)
.changeset/large-lands-brush.md (2)

5-12: End each sentence with a period.

Tighten up the changeset style.

As per coding guidelines.

 - Promoted `noNonNullAssertedOptionalChain` to the suspicious group
 - Promoted `useReactFunctionComponents` to the `style` group
 - Promoted `useImageSize` to the `correctness` group
 - Promoted `useConsistentTypeDefinitions` to the `style` group
 - Promoted `useQwikClasslist` to the `correctness` group
 - Promoted `noSecrets` to the `security` group
-Removed the lint rule `useAnchorHref`, because its use case is covered by `useValidAnchor`.
+ - Promoted `noNonNullAssertedOptionalChain` to the suspicious group.
+ - Promoted `useReactFunctionComponents` to the `style` group.
+ - Promoted `useImageSize` to the `correctness` group.
+ - Promoted `useConsistentTypeDefinitions` to the `style` group.
+ - Promoted `useQwikClasslist` to the `correctness` group.
+ - Promoted `noSecrets` to the `security` group.
+Removed the lint rule `useAnchorHref` because its use case is covered by `useValidAnchor`.

Also applies to: 13-13


5-12: Add links to each rule page.

Readers love receipts; link each mentioned rule to its docs.

As per coding guidelines.

📜 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 13d8699 and cec9553.

⛔ Files ignored due to path filters (41)
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs is excluded by !**/migrate/eslint_any_rule_to_biome.rs and included by **
  • crates/biome_cli/tests/snapshots/main_cases_linter_domains/should_enable_domain_via_cli.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/html_disabled_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/html_enabled_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/linter_shows_the_default_severity_of_rule_on.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_configuration/incorrect_rule_name.snap is excluded by !**/*.snap and included by **
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_configuration/src/generated/domain_selector.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.graphql.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_js_analyze/tests/specs/correctness/noQwikUseVisibleTask/noQwikUseVisibleTask/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/noQwikUseVisibleTask/noQwikUseVisibleTask/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-2.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-3.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid-4.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/valid-2.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useImageSize/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useQwikClasslist/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useQwikClasslist/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid-2.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid_entropy_high.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/invalid_entropy_low.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/security/noSecrets/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/valid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useReactFunctionComponents/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useReactFunctionComponents/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noNonNullAssertedOptionalChain/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noNonNullAssertedOptionalChain/valid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_json_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/invalid/empty.json.snap is excluded by !**/*.snap and included by **
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/valid/object.json.snap is excluded by !**/*.snap 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 (26)
  • .changeset/large-lands-brush.md (1 hunks)
  • crates/biome_analyze/src/rule.rs (2 hunks)
  • crates/biome_cli/tests/commands/format.rs (2 hunks)
  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs (1 hunks)
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs (3 hunks)
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.graphql (1 hunks)
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.options.json (1 hunks)
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/correctness.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/nursery/use_anchor_href.rs (0 hunks)
  • crates/biome_js_analyze/src/lint/security.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/style.rs (3 hunks)
  • crates/biome_js_analyze/src/lint/suspicious.rs (2 hunks)
  • crates/biome_js_analyze/tests/spec_tests.rs (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/invalid.jsx (0 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid-2.jsx (0 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid.jsx (0 hunks)
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json (1 hunks)
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json (1 hunks)
  • crates/biome_json_analyze/src/lint/nursery/no_empty_source.rs (0 hunks)
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/invalid/comment.jsonc (0 hunks)
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/valid/object.json (0 hunks)
  • crates/biome_rule_options/src/lib.rs (0 hunks)
💤 Files with no reviewable changes (8)
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/invalid.jsx
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/valid/object.json
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid.jsx
  • crates/biome_js_analyze/tests/specs/nursery/useAnchorHref/valid-2.jsx
  • crates/biome_js_analyze/src/lint/nursery/use_anchor_href.rs
  • crates/biome_json_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_json_analyze/tests/specs/nursery/noEmptySource/invalid/comment.jsonc
🚧 Files skipped from review as they are similar to previous changes (9)
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.options.json
  • crates/biome_js_analyze/src/lint/correctness/use_image_size.rs
  • crates/biome_js_analyze/src/lint/suspicious.rs
  • crates/biome_js_analyze/src/lint/correctness/use_qwik_classlist.rs
  • crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource/valid/allowComments.graphql
  • crates/biome_cli/tests/commands/format.rs
  • crates/biome_analyze/src/rule.rs
  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/validType.options.json
🧰 Additional context used
📓 Path-based instructions (5)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/security.rs
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_js_analyze/src/lint/correctness.rs
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/security.rs
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_js_analyze/src/lint/correctness.rs
**/tests/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files under a tests/ directory in each crate

Files:

  • crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
.changeset/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/*.md: In changesets, only use #### or ##### headers; other header levels are not allowed
Changesets should cover user-facing changes only; internal changes do not need changesets
Use past tense for what you did and present tense for current Biome behavior in changesets
When fixing a bug in a changeset, start with an issue link (e.g., “Fixed #1234: …”)
When referencing a rule or assist in a changeset, include a link to its page on the website
Include code blocks in changesets when applicable to illustrate changes
End every sentence in a changeset with a period

Files:

  • .changeset/large-lands-brush.md
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_js_analyze/src/lint/style.rs
  • crates/biome_js_analyze/src/lint/security.rs
  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
  • crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
  • crates/biome_js_analyze/src/lint/correctness.rs
🧠 Learnings (6)
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
PR: biomejs/biome#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_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Use declare_lint_rule! with version set to "next" for every rule definition

Applied to files:

  • crates/biome_js_analyze/src/lint/style.rs
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : If a lint rule is ported or inspired by another linter, add sources metadata in declare_lint_rule! with RuleSource (use .same() or .inspired())

Applied to files:

  • crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
PR: biomejs/biome#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_js_analyze/src/lint/nursery/no_empty_source.rs
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Documentation for rules must have a single-line first paragraph, include ## Examples with ### Invalid then ### Valid, and document options under ## Options with properly marked code blocks

Applied to files:

  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Mark code blocks in documentation with a language and required properties (e.g., expect_diagnostic for invalid snippets; options/full_options/use_options as needed). Each invalid snippet must emit exactly one diagnostic

Applied to files:

  • crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs
🧬 Code graph analysis (3)
crates/biome_js_analyze/src/lint/security.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • Security (1840-1865)
crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs (1)
crates/biome_analyze/src/rule.rs (2)
  • sources (610-613)
  • same (246-251)
crates/biome_js_analyze/src/lint/correctness.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • Correctness (1381-1658)
🪛 LanguageTool
.changeset/large-lands-brush.md

[formatting] ~13-~13: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...p Removed the lint rule useAnchorHref, because its use case is covered by `useValidAnc...

(COMMA_BEFORE_BECAUSE)

⏰ 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). (21)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: End-to-end tests
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Check Dependencies
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: lint
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
🔇 Additional comments (6)
crates/biome_js_analyze/src/lint/a11y/use_valid_anchor.rs (1)

80-80: LGTM! Sources attribution correctly updated.

The addition of RuleSource::EslintQwik("jsx-a").same() properly consolidates the functionality from the removed useAnchorHref rule. Using .same() correctly indicates identical logic, as per coding guidelines.

Based on learnings.

crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs (1)

85-88: Trailing comment detection now works correctly.

The added check for eof_token().ok()?.has_leading_comments() ensures that comments attached to the EOF token are recognised when allowComments is enabled. This fixes a gap where trailing comments weren't being detected.

crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs (1)

136-139: LGTM—trailing comment detection enhanced.

Consistent with the CSS and GraphQL implementations, this now properly recognises comments attached to the EOF token when allowComments is enabled.

crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs (1)

87-90: LGTM—trailing comment detection enhanced.

Matches the CSS and JS implementations, correctly handling comments attached to the EOF token when allowComments is enabled.

crates/biome_js_analyze/tests/specs/style/useConsistentTypeDefinitions/invalidType.options.json (1)

2-13: All checks passed—fixtures and schema are consistent.

Both validType.options.json and invalidType.options.json use the new style.useConsistentTypeDefinitions layout with "level": "on", and the schema path resolves correctly. Nothing to worry about here.

crates/biome_js_analyze/src/lint/security.rs (1)

10-11: Module wiring and schema exposure verified—severity confirmation needed.

The NoSecrets rule is correctly exported, grouped, and exposed in the workspace schema. However, I couldn't locate an explicit severity configuration in the rule file itself. Severity may be set through macro defaults or a separate configuration layer. Please manually confirm that the default severity is Error as intended by checking the rule's macro implementation or configuration documentation.

@ematipico ematipico merged commit cea002f into next Oct 22, 2025
23 of 25 checks passed
@ematipico ematipico deleted the feat/promote-rules-230 branch October 22, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project L-CSS Language: CSS 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.

4 participants

0