Skip to content

feat(json_analyze): implement noJsonUnsafeValues - #9758

Merged
Netail merged 3 commits into
biomejs:mainfrom
Netail:feat/no-unsafe-values
Sep 14, 2026
Merged

Netail merged 3 commits into
biomejs:mainfrom
Netail:feat/no-unsafe-values

Conversation

@Netail

@Netail Netail commented Mar 31, 2026 •

Copy link
Copy Markdown
Member

AI disclosure: The lone surrogate part is generated with Co-Pilot. There's some funky stuff going on that didn't work as expected with unicodes in rust, rewritten numerous of times myself couldn't get it to work, so let AI do the work (and honestly I think there's a better & shorter way, but me nor AI could figure it out)

Summary

Port Eslint JSON's no-unsafe-values, which disallows JSON values that are unsafe for interchange.

Test Plan

Unit tests

Docs

@changeset-bot

changeset-bot Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9cbf982

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

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

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

@github-actions github-actions Bot added A-Linter Area: linter L-JSON Language: JSON and super languages A-Diagnostic Area: diagnostocis labels Mar 31, 2026
@codspeed

codspeed Bot commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 16.42%

⚠️ 3 benchmarks measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. These results are not comparable, so they count as unchanged.

Preventing compiler optimizations

⚡ 1 improved benchmark
❌ 3 regressed benchmarks
✅ 339 untouched benchmarks
⏩ 6 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ json_analyzer[eucjp_1600564308684076393.json] 2.7 ms 3.8 ms -29.47%
❌ json_analyzer[big5-added_15586211152145260264.json] 1.6 ms 2.2 ms -25.49%
❌ json_analyzer[canada_639262044961882324.json] 613.6 ms 717.7 ms -14.5%
⚡ synthetic/attribute-heavy.html[uncached] 3.3 ms 3 ms +8.59%
⚠️ grit_query_anchor_kinds[code_snippet] < 1 ns < 1 ns N/A
⚠️ grit_query_anchor_kinds[metavariable] < 1 ns < 1 ns N/A
⚠️ grit_query_anchor_kinds[or_pattern] < 1 ns < 1 ns N/A

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Netail:feat/no-unsafe-values (9cbf982) with main (fc69047)

Open in CodSpeed

Footnotes

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

@github-actions github-actions Bot added A-CLI Area: CLI A-Project Area: project labels Mar 31, 2026
@Netail
Netail marked this pull request as ready for review April 1, 2026 21:34
return Some(NoUnsafeValuesIssueKind::UnsafeZero);
}
} else if !number_str.contains('.')
&& !number_str.to_lowercase_cow().contains('e')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to_lowercase_cow has a chance to allocate.

there's gotta be a case insenstive contains function we can do

Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs
@coderabbitai

coderabbitai Bot commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a nursery JSON lint rule noUnsafeValues that flags unsafe numeric and string literals: Infinity/−Infinity, integer values outside JavaScript’s safe integer range, subnormal numbers, unsafe zero encodings that underflow, and lone UTF‑16 surrogate escapes. Implements detection, diagnostics (with issue kinds and messages), helper functions including surrogate-escape scanning, unit tests, and valid/invalid JSON fixtures. Exposes NoUnsafeValues, AnyNoUnsafeValuesQuery, NoUnsafeValuesIssueKind and its message method, adds NoUnsafeValuesOptions, registers the rule module, updates a crate dependency, and adds a changeset entry.

Suggested reviewers

  • dyc3
  • ematipico
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description relates to the changeset by explaining the rule being ported, acknowledging AI-generated code, and outlining the test approach.
Title check ✅ Passed The title identifies the implementation of the main noUnsafeValues lint rule, but it uses the incorrect name noJsonUnsafeValues.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

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

Inline comments:
In @.changeset/shiny-parrots-jam.md:
- Line 5: The changeset currently links to the new rule page (the URL
https://biomejs.dev/linter/rules/no-unsafe-values/ on line that mentions the
nursery rule `noUnsafeValues`), but the docs page isn’t part of this PR; either
remove the hyperlink (leave the rule name `noUnsafeValues` unlinked or link to
an internal issue/placeholder) or ensure the docs page is published before
merging — update the `.changeset/shiny-parrots-jam.md` entry to drop or replace
the external link accordingly.

In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs`:
- Around line 109-114: The integer-safety branch in no_unsafe_values.rs should
detect unsafe integers based on the parsed value, not the lexeme shape; replace
the lexeme checks with a numeric integrality test (e.g., nmbr.fract() == 0.0 or
nmbr.trunc() == nmbr) and then test whether that integral nmbr is outside
MAX_SAFE_INTEGER/MIN_SAFE_INTEGER to return
NoUnsafeValuesIssueKind::UnsafeInteger; update the logic around the
UnsafeInteger decision in the function containing nmbr to also guard NaN/Inf and
preserve the existing tiny-nonzero check, and add test fixtures covering both
plain integer, decimal-with-.0 (e.g., 9007199254740992.0) and exponential forms
(e.g., 9.007199254740992e15) to prevent regressions.
- Around line 72-73: The constants MAX_SAFE_INTEGER and MIN_SAFE_INTEGER in
no_unsafe_values.rs are off by one; update MAX_SAFE_INTEGER to 9007199254740991
and MIN_SAFE_INTEGER to -9007199254740991 so they match JavaScript's 2^53 - 1
bounds, and add test fixtures that include the boundary values ±9007199254740991
to ensure they are treated as safe by the lint (update the relevant fixtures
used by the tests for the no_unsafe_values lint).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d03db7ff-5f44-4004-aab5-24d790cb1da4

📥 Commits

Reviewing files that changed from the base of the PR and between 716e4e1 and bc4ea5d.

⛔ Files ignored due to path filters (9)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • 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_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_configuration/src/generated/linter_options_check.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_json_analyze/tests/specs/nursery/noUnsafeValues/invalid.json.snap is excluded by !**/*.snap and included by **
  • crates/biome_json_analyze/tests/specs/nursery/noUnsafeValues/valid.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 (7)
  • .changeset/shiny-parrots-jam.md
  • crates/biome_json_analyze/Cargo.toml
  • crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs
  • crates/biome_json_analyze/tests/specs/nursery/noUnsafeValues/invalid.json
  • crates/biome_json_analyze/tests/specs/nursery/noUnsafeValues/valid.json
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/no_unsafe_values.rs

Comment thread .changeset/shiny-parrots-jam.md Outdated
Comment on lines +72 to +73
static MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_990;
static MIN_SAFE_INTEGER: i64 = -9_007_199_254_740_990;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's verify the actual constants in the file
cat -n crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs | sed -n '70,75p'

Repository: biomejs/biome

Length of output: 242


🏁 Script executed:

# Let's also find and examine the fixture files for this rule
fd -t f "no_unsafe_values" crates/biome_json_analyze/

Repository: biomejs/biome

Length of output: 119


🌐 Web query:

JavaScript Number.MAX_SAFE_INTEGER value

💡 Result:

The value of JavaScript's Number.MAX_SAFE_INTEGER is 9007199254740991 (2^53 - 1). This is the largest integer that can be safely represented and used in arithmetic operations without losing precision in JavaScript's double-precision floating-point format.

Citations:


🏁 Script executed:

# Let's find fixture files for this rule
fd -t f "no_unsafe_values" tests/ --search-path crates/biome_json_analyze/

Repository: biomejs/biome

Length of output: 222


🏁 Script executed:

# Search for fixture content in the rule source or nearby
find crates/biome_json_analyze -name "*no_unsafe_values*" -o -name "*NoUnsafeValues*"

Repository: biomejs/biome

Length of output: 119


🏁 Script executed:

# Let's look at the structure of test directories
fd -t d "nursery" crates/biome_json_analyze/tests/ | head -5

Repository: biomejs/biome

Length of output: 103


🏁 Script executed:

# Let's examine the nursery test specs
ls -la crates/biome_json_analyze/tests/specs/nursery/ | grep -i unsafe

Repository: biomejs/biome

Length of output: 120


🏁 Script executed:

# List all files in the nursery test directory
ls -la crates/biome_json_analyze/tests/specs/nursery/

Repository: biomejs/biome

Length of output: 503


🏁 Script executed:

# Check for no_unsafe_values fixtures
find crates/biome_json_analyze/tests/specs/nursery -name "*unsafe*"

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Let's see what fixture files exist for noUnsafeValues
ls -la crates/biome_json_analyze/tests/specs/nursery/noUnsafeValues/

Repository: biomejs/biome

Length of output: 428


🏁 Script executed:

# Read the fixture files to see what boundary cases are tested
cat crates/biome_json_analyze/tests/specs/nursery/noUnsafeValues/*

Repository: biomejs/biome

Length of output: 16296


The safe-integer bounds are off by one.

JavaScript's Number.MAX_SAFE_INTEGER is 9007199254740991 (2^53 - 1), but these constants are 9007199254740990. This causes ±9007199254740991 to be incorrectly flagged as unsafe. Please fix the constants and add those boundary values to the fixtures.

🩹 Minimal fix
-static MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_990;
-static MIN_SAFE_INTEGER: i64 = -9_007_199_254_740_990;
+static MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_991;
+static MIN_SAFE_INTEGER: i64 = -9_007_199_254_740_991;
📝 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
static MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_990;
static MIN_SAFE_INTEGER: i64 = -9_007_199_254_740_990;
static MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_991;
static MIN_SAFE_INTEGER: i64 = -9_007_199_254_740_991;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs` around lines
72 - 73, The constants MAX_SAFE_INTEGER and MIN_SAFE_INTEGER in
no_unsafe_values.rs are off by one; update MAX_SAFE_INTEGER to 9007199254740991
and MIN_SAFE_INTEGER to -9007199254740991 so they match JavaScript's 2^53 - 1
bounds, and add test fixtures that include the boundary values ±9007199254740991
to ensure they are treated as safe by the lint (update the relevant fixtures
used by the tests for the no_unsafe_values lint).

Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs`:
- Around line 127-130: The call to unescape_json_string followed by
has_lone_surrogate_escape is dead because unescape_json_string never produces
surrogate codepoints; remove the unescaped = unescape_json_string(value) and the
subsequent if block (the branch returning
NoUnsafeValuesIssueKind::LoneSurrogate) and rely on the existing raw escape
check (the earlier detection of "\uD800"-style escapes) instead; if you really
need to detect literal UTF-16 surrogates in the source, implement a separate
scan on the original bytes rather than using unescape_json_string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12962e71-b069-4e6a-983e-9cb10a4142b2

📥 Commits

Reviewing files that changed from the base of the PR and between bc4ea5d and 292931a.

📒 Files selected for processing (1)
  • crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs

Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs
Comment thread .changeset/shiny-parrots-jam.md Outdated
use regex::Regex;

declare_lint_rule! {
/// Disallow JSON values that are unsafe for interchange

@ematipico ematipico Apr 2, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/// Disallow JSON values that are unsafe for interchange
/// Disallow JSON values that are unsafe for interchange.

What does "interchange" mean here? I would look for a simpler explanation

Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment on lines +187 to +209

fn parse_unicode_escape(bytes: &[u8], i: usize) -> Option<u16> {
if i + 6 > bytes.len() || bytes[i] != b'\\' || bytes[i + 1] != b'u' {
return None;
}

// `\u` is an escape only when this backslash is not itself escaped.
let mut slash_run = 1;
let mut j = i;
while j > 0 && bytes[j - 1] == b'\\' {
slash_run += 1;
j -= 1;
}
if slash_run % 2 == 0 {
return None;
}

std::str::from_utf8(&bytes[i + 2..i + 6])
.ok()
.and_then(|s| u16::from_str_radix(s, 16).ok())
}

fn has_lone_surrogate_escape(bytes: &[u8]) -> bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add unit tests and docs for these functions?

Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
@Netail
Netail requested review from dyc3 and ematipico April 3, 2026 21:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

♻️ Duplicate comments (2)
crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs (2)

140-143: ⚠️ Potential issue | 🟠 Major

This check is ineffective and may cause false positives.

Per the unescape_json_string implementation (see context snippet from biome_deserialize/src/json.rs), lone surrogate escapes are silently dropped during unescaping—they never appear in the output. So this branch is dead for actual lone surrogates.

Worse, if the original JSON contains \\uD800 (an escaped backslash), after unescaping it becomes literal \uD800 characters. The function then misidentifies these as a lone surrogate escape, yielding a false positive.

The raw check on line 136 should be sufficient. Consider removing this block.

Suggested removal
                 if has_lone_surrogate_escape(raw.as_bytes()) {
                     return Some(NoUnsafeValuesIssueKind::LoneSurrogate);
                 }
 
-                let unescaped = unescape_json_string(value);
-                if has_lone_surrogate_escape(unescaped.as_bytes()) {
-                    return Some(NoUnsafeValuesIssueKind::LoneSurrogate);
-                }
-
                 None
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs` around lines
140 - 143, Remove the ineffective post-unescape check: delete the block that
calls unescape_json_string(...) and then tests
has_lone_surrogate_escape(unescaped.as_bytes()) returning
Some(NoUnsafeValuesIssueKind::LoneSurrogate); instead rely on the existing
raw-escape check already present earlier in the function. This removes false
positives caused when unescape_json_string drops lone-surrogate escapes or
converts escaped-backslash sequences into literal \u escapes; keep the rest of
the function and any other references to NoUnsafeValuesIssueKind untouched.

119-126: ⚠️ Potential issue | 🟠 Major

Unsafe integer detection misses decimal and exponential forms.

The check only triggers when the source text lacks . and e, but 9007199254740992.0 and 9.007199254740992e15 both represent the same unsafe integer. Consider checking whether the parsed value is integral (i.e., nmbr.fract() == 0.0) and out of bounds, rather than inspecting the lexeme shape.

Suggested approach
-                } else if !number_str.contains('.')
-                    && !number_str
-                        .as_bytes()
-                        .iter()
-                        .any(|byte| byte.eq_ignore_ascii_case(&b'e'))
-                    && (nmbr > MAX_SAFE_INTEGER as f64 || nmbr < MIN_SAFE_INTEGER as f64)
-                {
+                } else if nmbr.fract() == 0.0
+                    && (nmbr > MAX_SAFE_INTEGER as f64 || nmbr < MIN_SAFE_INTEGER as f64)
+                {
                     return Some(NoUnsafeValuesIssueKind::UnsafeInteger);

Also add test fixtures for 9007199254740992.0 and 9.007199254740992e15 to prevent regression.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs` around lines
119 - 126, The current unsafe-integer branch in no_unsafe_values.rs relies on
inspecting number_str for '.' or 'e' which misses cases like
"9007199254740992.0" and "9.007199254740992e15"; change the condition that
currently uses number_str + byte checks to instead test the parsed nmbr for
integrality (use nmbr.fract() == 0.0) and then compare nmbr against
MAX_SAFE_INTEGER and MIN_SAFE_INTEGER to return
Some(NoUnsafeValuesIssueKind::UnsafeInteger); keep use of nmbr and the existing
MAX_SAFE_INTEGER/MIN_SAFE_INTEGER constants and preserve surrounding logic flow,
and add test fixtures covering "9007199254740992.0" and "9.007199254740992e15"
to prevent regressions.
🧹 Nitpick comments (1)
crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs (1)

127-129: Redundant nmbr != 0.0 check.

Given the control flow (the else if chain), we can only reach this branch when nmbr != 0.0 is already guaranteed. The guard is harmless but unnecessary.

Optional simplification
-                } else if nmbr != 0.0 && nmbr.abs() < f64::MIN_POSITIVE {
+                } else if nmbr.abs() < f64::MIN_POSITIVE {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs` around lines
127 - 129, Remove the redundant nmbr != 0.0 guard in the branch that returns
NoUnsafeValuesIssueKind::Subnormal (the else if using nmbr and
f64::MIN_POSITIVE); because the surrounding else-if chain already guarantees
nmbr is nonzero, simplify the condition to just nmbr.abs() < f64::MIN_POSITIVE
(leave the return of NoUnsafeValuesIssueKind::Subnormal unchanged).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs`:
- Around line 140-143: Remove the ineffective post-unescape check: delete the
block that calls unescape_json_string(...) and then tests
has_lone_surrogate_escape(unescaped.as_bytes()) returning
Some(NoUnsafeValuesIssueKind::LoneSurrogate); instead rely on the existing
raw-escape check already present earlier in the function. This removes false
positives caused when unescape_json_string drops lone-surrogate escapes or
converts escaped-backslash sequences into literal \u escapes; keep the rest of
the function and any other references to NoUnsafeValuesIssueKind untouched.
- Around line 119-126: The current unsafe-integer branch in no_unsafe_values.rs
relies on inspecting number_str for '.' or 'e' which misses cases like
"9007199254740992.0" and "9.007199254740992e15"; change the condition that
currently uses number_str + byte checks to instead test the parsed nmbr for
integrality (use nmbr.fract() == 0.0) and then compare nmbr against
MAX_SAFE_INTEGER and MIN_SAFE_INTEGER to return
Some(NoUnsafeValuesIssueKind::UnsafeInteger); keep use of nmbr and the existing
MAX_SAFE_INTEGER/MIN_SAFE_INTEGER constants and preserve surrounding logic flow,
and add test fixtures covering "9007199254740992.0" and "9.007199254740992e15"
to prevent regressions.

---

Nitpick comments:
In `@crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs`:
- Around line 127-129: Remove the redundant nmbr != 0.0 guard in the branch that
returns NoUnsafeValuesIssueKind::Subnormal (the else if using nmbr and
f64::MIN_POSITIVE); because the surrounding else-if chain already guarantees
nmbr is nonzero, simplify the condition to just nmbr.abs() < f64::MIN_POSITIVE
(leave the return of NoUnsafeValuesIssueKind::Subnormal unchanged).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6c605b71-74b9-4142-a06e-06367fda25cc

📥 Commits

Reviewing files that changed from the base of the PR and between 292931a and 4234ba1.

⛔ Files ignored due to path filters (1)
  • crates/biome_json_analyze/tests/specs/nursery/noUnsafeValues/invalid.json.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (2)
  • .changeset/shiny-parrots-jam.md
  • crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs
✅ Files skipped from review due to trivial changes (1)
  • .changeset/shiny-parrots-jam.md

@Netail
Netail force-pushed the feat/no-unsafe-values branch from b5aaa16 to 5066e56 Compare April 3, 2026 22:01
/// escape is itself escaped (for example `\\uXXXX`), or if the hex digits are
/// invalid.
fn parse_unicode_escape(bytes: &[u8], i: usize) -> Option<u16> {
if i + 6 > bytes.len() || bytes[i] != b'\\' || bytes[i + 1] != b'u' {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this is a safe check. Shouldn't we make sure that i is smaller than bytes.len()? If we don't, we risk overflowing when accessing bytes[i]

// `\u` is an escape only when this backslash is not itself escaped.
let mut slash_run = 1;
let mut j = i;
while j > 0 && bytes[j - 1] == b'\\' {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same. We must make sure we don't overflow when accessing bytes like this

Comment on lines +270 to +276
fn parse_unicode_escape_returns_none_for_escaped_backslash() {
assert_eq!(parse_unicode_escape(br"\\uD83D", 1), None);
}

#[test]
fn parse_unicode_escape_returns_none_for_invalid_hex() {
assert_eq!(parse_unicode_escape(br"\uZZZZ", 0), None);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unit tests should also harness functions. Should we test it against higher numbers e.g. 20?

Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs
declare_lint_rule! {
/// Disallow unsafe JSON values that may cause interoperability issues.
///
/// JSON is widely used for data interchange between systems, but certain values can cause interoperability issues when transferred between different parsers and environments. The common unsafe values are:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we simplify these docs and make them a bit more user centric?

There are a lot of theoretical words, but it doesn't actually frame a situation where this issue could happen.

I struggle with some examples, but is the transfer of data between a python backend to a JavaScript frontend one of these examples?

@Netail Netail Apr 4, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Could be between parsers of different languages, but also the same language. It depends on how the parser is built. But these are common issues that can cause issues when passing onto a different parser, resulting in data corruption or crashing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I noticed you asked for a re review but this comment wasn't addressed. Are you looking for some suggestions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah woops, forgot that part

@Netail
Netail force-pushed the feat/no-unsafe-values branch from ce3dca8 to 51c82f8 Compare April 4, 2026 15:16
@Netail
Netail requested a review from ematipico April 4, 2026 15:17
@ematipico

Copy link
Copy Markdown
Member

I would also consider renaming the rule in no_json_unsafe_values, unless you want to consider implementing this rule in other languages e.g. graphql or JavaScript

@Netail

Netail commented Apr 6, 2026 •

Copy link
Copy Markdown
Member Author

I would also consider renaming the rule in no_json_unsafe_values, unless you want to consider implementing this rule in other languages e.g. graphql or JavaScript

no plans right now, unsure where the risks lay at other languages 🤔 But in theory it could also become a rule for other languages, just not seeing where atm

@Netail
Netail force-pushed the feat/no-unsafe-values branch from 675209c to e8a4475 Compare April 6, 2026 17:23
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
Comment thread crates/biome_json_analyze/src/lint/nursery/no_unsafe_values.rs Outdated
@Netail
Netail marked this pull request as draft April 25, 2026 22:38
@Netail
Netail force-pushed the feat/no-unsafe-values branch 3 times, most recently from 33eefbf to 7960ced Compare September 6, 2026 22:49
@Netail
Netail marked this pull request as ready for review September 8, 2026 20:26
@Netail
Netail force-pushed the feat/no-unsafe-values branch from 3c131c1 to 7da6ff9 Compare September 8, 2026 20:44
@Netail
Netail requested a review from dyc3 September 8, 2026 20:45
@Netail

Netail commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Revived this PR from quite some time ago, implemented quite some of the feedback. A fresh look at it could be nice :)

Comment thread crates/biome_json_analyze/src/lint/nursery/no_json_unsafe_values.rs Outdated
@Netail Netail changed the title feat(json_analyze): implement noUnsafeValues feat(json_analyze): implement noJsonUnsafeValues Sep 11, 2026

@ematipico ematipico left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. I would change the examples, and remove "interchange" from the changeset

Comment thread .changeset/shiny-parrots-jam.md Outdated
"@biomejs/biome": patch
---

Added the nursery rule [`noJsonUnsafeValues`](https://biomejs.dev/linter/rules/no-json-unsafe-values/), which disallows JSON values that are unsafe for interchange.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would use another word instead of "interchange".

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

placeholder

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

placeholder

@hessam777 ?

Comment on lines +33 to +55
/// ```json,expect_diagnostic
/// 2e308
/// ```
///
/// ```json,expect_diagnostic
/// -2e308
/// ```
///
/// ```json,expect_diagnostic
/// "\ud83d"
/// ```
///
/// ```json,expect_diagnostic
/// 1e-400
/// ```
///
/// ```json,expect_diagnostic
/// 9007199254740992
/// ```
///
/// ```json,expect_diagnostic
/// 2.2250738585072009e-308
/// ```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly a nit, but rarely do users create JSON files that start with a number (I know they are valid, though). I would create JSON objects with unsafe values.

Comment on lines +269 to +272
#[cfg(test)]
mod tests {
use super::{has_lone_surrogate_escape, parse_unicode_escape};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If integration tests cover these cases, then these tests aren't needed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Only some of them

@Netail
Netail force-pushed the feat/no-unsafe-values branch from 92214d7 to 9cbf982 Compare September 14, 2026 19:00
@Netail
Netail merged commit 02ea438 into biomejs:main Sep 14, 2026
43 of 44 checks passed
@Netail
Netail deleted the feat/no-unsafe-values branch September 14, 2026 19:14
@github-actions github-actions Bot mentioned this pull request Sep 14, 2026
OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Client that referenced this pull request Sep 23, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev) ([source](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome)) | imports | patch | [`2.5.13` -> `2.5.14`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.5.13/2.5.14) |

---

### Release Notes

<details>
<summary>biomejs/biome (@&#8203;biomejs/biome)</summary>

### [`v2.5.14`](https://github.com/biomejs/biome/blob/HEAD/packages/@biomejs/biome/CHANGELOG.md#2514)

[Compare Source](https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.13...@biomejs/biome@2.5.14)

##### Patch Changes

- [#&#8203;9022](biomejs/biome#9022) [`0d49e24`](biomejs/biome@0d49e24) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added the nursery rule [`noReturnInFinally`](https://biomejs.dev/linter/rules/no-return-in-finally/). This rule disallows return statements in `Promise.prototype.finally()` callbacks, including inside nested blocks and conditional branches. Returns in nested functions are ignored by the rule.

  ```js
  // Invalid: return in finally callback
  Promise.resolve(1).finally(() => { return 2 })

  // Valid: no return in finally callback
  Promise.resolve(1).finally(() => { console.log(2) })
  ```

  Returning a value from a `Promise.prototype.finally()` callback does not replace the original promise's fulfillment value, which can be confusing. Returned promises and thenables are awaited, and their rejection rejects the resulting promise.

- [#&#8203;11754](biomejs/biome#11754) [`71eaa0d`](biomejs/biome@71eaa0d) Thanks [@&#8203;griff-rees](https://github.com/griff-rees)! - Added the nursery rule [`noSvelteAtDebugTags`](https://biomejs.dev/linter/rules/no-svelte-at-debug-tags/), which disallows Svelte's `{@debug}` tag.

  ```svelte
  <!-- Invalid: leftover debugging tag -->
  {@debug user}
  ```

  The `{@debug}` tag is a debugging aid and should be removed once you no longer need it, as it should not remain in production code. The rule provides a safe fix that removes the tag.

- [#&#8203;11725](biomejs/biome#11725) [`5eb5f09`](biomejs/biome@5eb5f09) Thanks [@&#8203;m1handr](https://github.com/m1handr)! - Added the nursery rule [`useValidTestTitle`](https://biomejs.dev/linter/rules/use-valid-test-title/), which enforces valid titles for unit test cases and suites.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;8471](biomejs/biome#8471): `source.fixAll.biome` ignored `formatter.formatWithErrors`. It now applies safe fixes without formatting files that have parse errors when the option is disabled.

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7771](biomejs/biome#7771): Grit plugins that use `sequential` no longer panic when Biome processes files.

- [#&#8203;11766](biomejs/biome#11766) [`c2542c6`](biomejs/biome@c2542c6) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed validation of `readonly` and `accessor` modifiers: combining them in either order now reports that they cannot be used together.

- [#&#8203;11461](biomejs/biome#11461) [`22e9966`](biomejs/biome@22e9966) Thanks [@&#8203;FoundDream](https://github.com/FoundDream)! - Fixed [#&#8203;11423](biomejs/biome#11423): Multiline template interpolations now preserve the indentation of their closing brace when the source indentation is not a multiple of `tabWidth`.

  ```diff
   const value = `
        ${
          condition
            ? "yes"
            : "no"
  -}
  +     }
   `;
  ```

- [#&#8203;11766](biomejs/biome#11766) [`c2542c6`](biomejs/biome@c2542c6) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11763](biomejs/biome#11763): TypeScript class members using `override accessor`, such as `override accessor value = 1`, now parse correctly. The reversed order, `accessor override`, now reports that `override` must precede `accessor`.

- [#&#8203;11790](biomejs/biome#11790) [`17d0ff0`](biomejs/biome@17d0ff0) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10248](biomejs/biome#10248): [`noUselessFragments`](https://biomejs.dev/linter/rules/no-useless-fragments/) now allows fragments with props in Astro files, such as `<Fragment slot="name">{text}</Fragment>` inside template expressions.

- [#&#8203;11777](biomejs/biome#11777) [`7ee3a6c`](biomejs/biome@7ee3a6c) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7573](biomejs/biome#7573): added the `requireExplicitCase` option to [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/). When set to `true`, the rule reports missing cases even when the switch has a `default` clause, so you can keep a runtime fallback while checking that every value in the union has its own case. The option defaults to `false`.

- [#&#8203;11751](biomejs/biome#11751) [`d37f24b`](biomejs/biome@d37f24b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;8347](biomejs/biome#8347): the fix from [`useConsistentArrowReturn`](https://biomejs.dev/linter/rules/use-consistent-arrow-return/) now parenthesizes returned expressions that begin with object literals before removing the arrow function body braces, preventing invalid output for expressions such as object property access.

- [#&#8203;11784](biomejs/biome#11784) [`46e8912`](biomejs/biome@46e8912) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11782](biomejs/biome#11782): [`noUndeclaredCustomProperties`](https://biomejs.dev/linter/rules/no-undeclared-custom-properties/) could hang while checking stylesheets imported by JavaScript modules with many shared dependencies.

- [#&#8203;11731](biomejs/biome#11731) [`1534885`](biomejs/biome@1534885) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7984](biomejs/biome#7984): The fix from [`useSimplifiedLogicExpression`](https://biomejs.dev/linter/rules/use-simplified-logic-expression/) now preserves line breaks in multiline conditions with line comments, preventing the right-hand side condition from being commented out.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7304](biomejs/biome#7304): the HTML formatter now preserves authored segment breaks between CJK characters, and next to CJK punctuation, instead of replacing them with spaces.

  ```diff
   <div lang="zh-Hant-TW">
  -  這個段落是那麼長, 在一行寫不行。
  +  這個段落是那麼長,
  +  在一行寫不行。
   </div>
  ```

- [#&#8203;11749](biomejs/biome#11749) [`ff992a1`](biomejs/biome@ff992a1) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;11747](biomejs/biome#11747): formatting and checking large parenthesized object expressions no longer exhibit quadratic slowdowns.

- [#&#8203;11736](biomejs/biome#11736) [`1dd1fc4`](biomejs/biome@1dd1fc4) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8177](biomejs/biome#8177): code actions no longer modify the wrong part of Vue, Svelte, or Astro files when experimental full HTML support is disabled.

- [#&#8203;11743](biomejs/biome#11743) [`3835945`](biomejs/biome@3835945) Thanks [@&#8203;santichausis](https://github.com/santichausis)! - Fixed [#&#8203;10247](biomejs/biome#10247): `biome check --write`/`biome lint --write` now correctly writes fixes for code inside an HTML attribute expression (for example a Svelte `onclick={...}` handler, or a mustache expression like `{count}`), instead of silently reporting the diagnostic as fixable and applying nothing.

  For example, running `biome lint --write --unsafe` for [`useBlockStatements`](https://biomejs.dev/linter/rules/use-block-statements/) (an unsafe fix) on this Svelte component used to leave the file unchanged:

  ```svelte
  <button onclick={() => { if (open) close(); }}>Close</button>
  ```

- [#&#8203;11740](biomejs/biome#11740) [`8ea8b4a`](biomejs/biome@8ea8b4a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11453](biomejs/biome#11453): [`useConsistentTestIt`](https://biomejs.dev/linter/rules/use-consistent-test-it/) now updates imports alongside calls, preserving the original export through an alias. The rule ignores locally declared functions and withholds fixes when the preferred name would conflict with another binding or global reference.

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed the HTML formatter incorrectly applying native HTML element formatting to PascalCase component names such as `<Ul>` and `<Body>` in Vue, Svelte, and Astro files.

  ```diff
  -<Body>
  -  <div>content</div>
  -</Body>
  +<Body><div>content</div></Body>
  ```

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed the HTML formatter incorrectly applying SVG block formatting to unknown elements whose names matched SVG element names.

  ```diff
  -<foreignobject>
  -  <div>content</div>
  -</foreignobject>
  +<foreignobject><div>content</div></foreignobject>
  ```

- [#&#8203;11741](biomejs/biome#11741) [`fc69047`](biomejs/biome@fc69047) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8893](biomejs/biome#8893): [`useImportExtensions`](https://biomejs.dev/linter/rules/use-import-extensions/) no longer suggests adding `.ts` to `.jsx` imports when a colocated `.d.ts` file provides type declarations.

- [#&#8203;11642](biomejs/biome#11642) [`c87341c`](biomejs/biome@c87341c) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added the nursery rule [useConsistentFunctionStyle](https://biomejs.dev/linter/rules/use-consistent-function-style/), which requires a consistent style for defining functions.

  By default, the rule reports the following declaration because it requires a function expression assigned to a variable:

  ```js
  function greet() {
      return "Hello";
  }
  ```

- [#&#8203;11770](biomejs/biome#11770) [`ddfd622`](biomejs/biome@ddfd622) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8980](biomejs/biome#8980): suppression comments targeting the entire `assist` category are now respected, including `biome-ignore-all assist` when running `check`.

- [#&#8203;11792](biomejs/biome#11792) [`7a4b895`](biomejs/biome@7a4b895) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed dashed utility base names in the Tailwind parser, including `border-bs`, `font-features`, and `scrollbar-thumb`. Classes such as `min-inline-[12rem]` now preserve the complete base name and parse the arbitrary value separately.

- [#&#8203;11739](biomejs/biome#11739) [`1fc17e3`](biomejs/biome@1fc17e3) Thanks [@&#8203;Netail](https://github.com/Netail)! - The rule [`useIncludes`](https://biomejs.dev/linter/rules/use-includes/) now also reports `lastIndexOf()` comparisons and `some()` calls with a strict-equality callback.

  ```js
  arr.lastIndexOf(x) !== -1

  arr.some(item => item === x)
  ```

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;6888](biomejs/biome#6888). GritQL plugins can now use `contains` on import-clause metavariables such as `$clause` in `import $clause from "module"` patterns.

- [#&#8203;11790](biomejs/biome#11790) [`17d0ff0`](biomejs/biome@17d0ff0) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;11786](biomejs/biome#11786): [`useAnchorContent`](https://biomejs.dev/linter/rules/use-anchor-content/) now reports anchors without accessible content in HTML, Astro, Vue, and Svelte even when they have an `aria-label`, `aria-labelledby`, or `title` attribute, matching JSX behavior.

- [#&#8203;11651](biomejs/biome#11651) [`a9c4aa0`](biomejs/biome@a9c4aa0) Thanks [@&#8203;saberoueslati](https://github.com/saberoueslati)! - Added the new nursery rule [`noVueUndeclaredDirectives`](https://biomejs.dev/linter/rules/no-vue-undeclared-directives/), which reports custom Vue directives that are not declared by a `<script setup>` binding, the component's `directives` option, or the rule's `globals` option. Closes [#&#8203;11478](biomejs/biome#11478).

  ```vue
  <template>
    <!-- v-highlight is not declared anywhere -->
    <div v-highlight></div>
  </template>
  ```

  Aliased named imports in single-file components are now tracked under their local name, so `noUndeclaredVariables` recognizes `vHighlight` in `import { highlight as vHighlight } from "./directives"`.

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7795](biomejs/biome#7795). The [`noJsxLiterals`](https://biomejs.dev/linter/rules/no-jsx-literals/) rule now ignores surrounding whitespace when matching literals against `allowedStrings`.

- [#&#8203;11780](biomejs/biome#11780) [`99c7049`](biomejs/biome@99c7049) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed false positives in [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) when numeric cases use different spellings of the same value. For example, `case 0x1` now covers the numeric literal type `1`.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7880](biomejs/biome#7880): [`noUselessStringConcat`](https://biomejs.dev/linter/rules/no-useless-string-concat/) no longer reports literal concatenations split across multiple lines when a numeric literal ends the chain.

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Improved performance of the HTML formatter for documents that contain many HTML-native or SVG-native tags.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7949](biomejs/biome#7949): [`useReadonlyClassProperties`](https://biomejs.dev/linter/rules/use-readonly-class-properties/) now reports static class properties that are never reassigned.

- [#&#8203;11751](biomejs/biome#11751) [`d37f24b`](biomejs/biome@d37f24b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7644](biomejs/biome#7644): [`useImportExtensions`](https://biomejs.dev/linter/rules/use-import-extensions/) now resolves path aliases declared by referenced TypeScript project configurations.

- [#&#8203;11791](biomejs/biome#11791) [`f88793c`](biomejs/biome@f88793c) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed a false positive in [`useTailwindShorthandClasses`](https://biomejs.dev/linter/rules/use-tailwind-shorthand-classes/) for strings in conditional tests, such as `cn(m === "w-2 h-2" ? "bg-red-800" : "bg-red-400")`.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7783](biomejs/biome#7783): [`noNoninteractiveElementInteractions`](https://biomejs.dev/linter/rules/no-noninteractive-element-interactions/) no longer reports event handlers on native `<dialog>` elements.

- [#&#8203;11733](biomejs/biome#11733) [`7030068`](biomejs/biome@7030068) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11730](biomejs/biome#11730): [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) reports missing cases when iterating over a class property with `for...of`.

- [#&#8203;11717](biomejs/biome#11717) [`2107dae`](biomejs/biome@2107dae) Thanks [@&#8203;ternaus](https://github.com/ternaus)! - Fixed [#&#8203;11716](biomejs/biome#11716): the [`noUnknownAttribute`](https://biomejs.dev/linter/rules/no-unknown-attribute/) rule now accepts fullscreen event handlers, the `credentialless` iframe property, and the SVG `maskType` property when the React dependency range allows React 19.3 or later. The `credentialless` and `maskType` properties are restricted to `<iframe>` and `<mask>` elements, respectively.

- [#&#8203;11737](biomejs/biome#11737) [`b7e3559`](biomejs/biome@b7e3559) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11692](biomejs/biome#11692): [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/) now detects unhandled promises returned through generic method signatures, including Playwright fixtures.

- [#&#8203;11780](biomejs/biome#11780) [`99c7049`](biomejs/biome@99c7049) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7747](biomejs/biome#7747): [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) now reports missing cases for literal unions derived from const tuples with `(typeof values)[number]` and objects with `keyof typeof object`.

  Other type-aware rules, including [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/) and [`noUselessTypeConversion`](https://biomejs.dev/linter/rules/no-useless-type-conversion/), also recognize supported indexed-access results.

- [#&#8203;11724](biomejs/biome#11724) [`a9a5e9a`](biomejs/biome@a9a5e9a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed redundant parentheses around binary and logical unary operands with leading line comments.

  ```diff
   !(
     // leading
  -  (a || b)
  +  a || b
   );
  ```

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7722](biomejs/biome#7722): [`noUnusedImports`](https://biomejs.dev/linter/rules/no-unused-imports/) no longer reports type-only imports used in computed names of declared class properties.

- [#&#8203;11731](biomejs/biome#11731) [`1534885`](biomejs/biome@1534885) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;6390](biomejs/biome#6390): Biome now offers suppression actions for [`noDynamicNamespaceImportAccess`](https://biomejs.dev/linter/rules/no-dynamic-namespace-import-access/) in editors.

- [#&#8203;11751](biomejs/biome#11751) [`d37f24b`](biomejs/biome@d37f24b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7533](biomejs/biome#7533): [`noDescendingSpecificity`](https://biomejs.dev/linter/rules/no-descending-specificity/) no longer compares selector specificity across separate cascade layer blocks.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;6206](biomejs/biome#6206): [`useUniqueElementIds`](https://biomejs.dev/linter/rules/use-unique-element-ids) no longer reports static IDs on elements in SVG contexts.

  ```jsx
  <svg>
      <defs>
          <pattern id="dots" width="10" height="10" />
      </defs>
      <rect fill="url(#dots)" width="100%" height="100%" />
  </svg>
  ```

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;5447](biomejs/biome#5447), so the GitHub reporter now associates annotations with the correct files when Biome runs from a nested directory.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7816](biomejs/biome#7816): [`useHookAtTopLevel`](https://biomejs.dev/linter/rules/use-hook-at-top-level/) no longer reports methods named like hooks when called on another function's result, such as `Reactotron.configure(...).useReactNative(...)`.

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Removed special HTML formatter handling for the obsolete `<listing>` element.

- [#&#8203;11731](biomejs/biome#11731) [`1534885`](biomejs/biome@1534885) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed an issue where Grit plugin code fixes weren't available as editor code actions.

- [#&#8203;11726](biomejs/biome#11726) [`dea163f`](biomejs/biome@dea163f) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11722](biomejs/biome#11722): the JavaScript formatter inserts a newline before the closing angle bracket when a leading comment forces type arguments onto multiple lines.

  ```diff
   type Foo = Record<
     // comment
     string,
  -  number>;
  +  number
  +>;
  ```

- [#&#8203;9758](biomejs/biome#9758) [`02ea438`](biomejs/biome@02ea438) Thanks [@&#8203;Netail](https://github.com/Netail)! - Added the nursery rule [`noJsonUnsafeValues`](https://biomejs.dev/linter/rules/no-json-unsafe-values/), which disallows JSON values that are unsafe to use between different tools or languages.

  **Invalid:**

  ```json5
  [
    2e308, // Number evaluating to Infinity
    -2e308, // Number evaluating to -Infinity
    "\ud83d", // String with lone surrogate
    1e-400, // Unsafe zero (too small, will evaluate to 0)
    9007199254740992, // Unsafe integer (outside safe integer range)
    2.2250738585072009e-308, // Subnormal number
  ]
  ```

- [#&#8203;11790](biomejs/biome#11790) [`17d0ff0`](biomejs/biome@17d0ff0) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;8574](biomejs/biome#8574): the JavaScript formatter sometimes added extra parentheses and moved comments when formatting multiline expressions after operators such as `!`. Comments now stay beside the values they describe, without an extra pair of parentheses.

  ```diff
   !(
  -  (
  -    cond1 || // force this to be multi line
  -    cond3
  -  ) // comment
  +  cond1 || // force this to be multi line
  +  cond3 // comment
   );
  ```

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7711](biomejs/biome#7711): `biome lint --suppress` no longer fails with conflicting rule fixes when multiple diagnostics target a declaration preceded by a multiline comment.

- [#&#8203;11700](biomejs/biome#11700) [`0e9fe53`](biomejs/biome@0e9fe53) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added the nursery rule [`noObsoleteTags`](https://biomejs.dev/linter/rules/no-obsolete-tags/), which reports obsolete HTML elements in HTML and JSX, such as `<font color="red">Text</font>`.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7363](biomejs/biome#7363): Biome GritQL plugins now match TypeScript interface snippets such as `interface $name { $body }`.

- [#&#8203;11729](biomejs/biome#11729) [`f047985`](biomejs/biome@f047985) Thanks [@&#8203;m1handr](https://github.com/m1handr)! - Added support for `suite()` as an alias of `describe()` across test analysis rules and formatter. Rules now recognize `suite`, `fsuite`, `xsuite`, and `test.suite` blocks. The formatter recognises them as test declarations.

- [#&#8203;11778](biomejs/biome#11778) [`4b7aa1f`](biomejs/biome@4b7aa1f) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7727](biomejs/biome#7727): GritQL snippets such as `import $what from $where` now match namespace imports, including type-only imports. Explicit `import type $what from $where` patterns also match type-only named and namespace imports.

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7603](biomejs/biome#7603): [`useSingleJsDocAsterisk`](https://biomejs.dev/linter/rules/use-single-js-doc-asterisk/) no longer reports asterisks that are part of JSDoc comment content, such as italic text, as extra line markers.

- [#&#8203;11706](biomejs/biome#11706) [`e19512a`](biomejs/biome@e19512a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11704](biomejs/biome#11704): files re-included by negation patterns in a nested `.gitignore` are processed when `vcs.useIgnoreFile` is enabled, even when the ignore file contains `*`.

- [#&#8203;11718](biomejs/biome#11718) [`76a302a`](biomejs/biome@76a302a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8573](biomejs/biome#8573): own-line comments before binary operators stay above the operator when `javascript.formatter.operatorLinebreak` is `"before"`.

  ```diff
   foo
  -  || // comment
  -  bar;
  +  // comment
  +  || bar;
  ```

- [#&#8203;9797](biomejs/biome#9797) [`64fd314`](biomejs/biome@64fd314) Thanks [@&#8203;Netail](https://github.com/Netail)! - Added the nursery rule [`useConsistentObjectKeys`](https://biomejs.dev/linter/rules/use-consistent-object-keys), which requires JSON object keys to follow a consistent Unicode representation.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMDUuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjEwNS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Client/pulls/24
OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Server that referenced this pull request Sep 23, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev) ([source](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome)) | imports | patch | [`2.5.13` -> `2.5.14`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.5.13/2.5.14) |

---

### Release Notes

<details>
<summary>biomejs/biome (@&#8203;biomejs/biome)</summary>

### [`v2.5.14`](https://github.com/biomejs/biome/blob/HEAD/packages/@biomejs/biome/CHANGELOG.md#2514)

[Compare Source](https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.13...@biomejs/biome@2.5.14)

##### Patch Changes

- [#&#8203;9022](biomejs/biome#9022) [`0d49e24`](biomejs/biome@0d49e24) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added the nursery rule [`noReturnInFinally`](https://biomejs.dev/linter/rules/no-return-in-finally/). This rule disallows return statements in `Promise.prototype.finally()` callbacks, including inside nested blocks and conditional branches. Returns in nested functions are ignored by the rule.

  ```js
  // Invalid: return in finally callback
  Promise.resolve(1).finally(() => { return 2 })

  // Valid: no return in finally callback
  Promise.resolve(1).finally(() => { console.log(2) })
  ```

  Returning a value from a `Promise.prototype.finally()` callback does not replace the original promise's fulfillment value, which can be confusing. Returned promises and thenables are awaited, and their rejection rejects the resulting promise.

- [#&#8203;11754](biomejs/biome#11754) [`71eaa0d`](biomejs/biome@71eaa0d) Thanks [@&#8203;griff-rees](https://github.com/griff-rees)! - Added the nursery rule [`noSvelteAtDebugTags`](https://biomejs.dev/linter/rules/no-svelte-at-debug-tags/), which disallows Svelte's `{@debug}` tag.

  ```svelte
  <!-- Invalid: leftover debugging tag -->
  {@debug user}
  ```

  The `{@debug}` tag is a debugging aid and should be removed once you no longer need it, as it should not remain in production code. The rule provides a safe fix that removes the tag.

- [#&#8203;11725](biomejs/biome#11725) [`5eb5f09`](biomejs/biome@5eb5f09) Thanks [@&#8203;m1handr](https://github.com/m1handr)! - Added the nursery rule [`useValidTestTitle`](https://biomejs.dev/linter/rules/use-valid-test-title/), which enforces valid titles for unit test cases and suites.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;8471](biomejs/biome#8471): `source.fixAll.biome` ignored `formatter.formatWithErrors`. It now applies safe fixes without formatting files that have parse errors when the option is disabled.

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7771](biomejs/biome#7771): Grit plugins that use `sequential` no longer panic when Biome processes files.

- [#&#8203;11766](biomejs/biome#11766) [`c2542c6`](biomejs/biome@c2542c6) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed validation of `readonly` and `accessor` modifiers: combining them in either order now reports that they cannot be used together.

- [#&#8203;11461](biomejs/biome#11461) [`22e9966`](biomejs/biome@22e9966) Thanks [@&#8203;FoundDream](https://github.com/FoundDream)! - Fixed [#&#8203;11423](biomejs/biome#11423): Multiline template interpolations now preserve the indentation of their closing brace when the source indentation is not a multiple of `tabWidth`.

  ```diff
   const value = `
        ${
          condition
            ? "yes"
            : "no"
  -}
  +     }
   `;
  ```

- [#&#8203;11766](biomejs/biome#11766) [`c2542c6`](biomejs/biome@c2542c6) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11763](biomejs/biome#11763): TypeScript class members using `override accessor`, such as `override accessor value = 1`, now parse correctly. The reversed order, `accessor override`, now reports that `override` must precede `accessor`.

- [#&#8203;11790](biomejs/biome#11790) [`17d0ff0`](biomejs/biome@17d0ff0) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10248](biomejs/biome#10248): [`noUselessFragments`](https://biomejs.dev/linter/rules/no-useless-fragments/) now allows fragments with props in Astro files, such as `<Fragment slot="name">{text}</Fragment>` inside template expressions.

- [#&#8203;11777](biomejs/biome#11777) [`7ee3a6c`](biomejs/biome@7ee3a6c) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7573](biomejs/biome#7573): added the `requireExplicitCase` option to [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/). When set to `true`, the rule reports missing cases even when the switch has a `default` clause, so you can keep a runtime fallback while checking that every value in the union has its own case. The option defaults to `false`.

- [#&#8203;11751](biomejs/biome#11751) [`d37f24b`](biomejs/biome@d37f24b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;8347](biomejs/biome#8347): the fix from [`useConsistentArrowReturn`](https://biomejs.dev/linter/rules/use-consistent-arrow-return/) now parenthesizes returned expressions that begin with object literals before removing the arrow function body braces, preventing invalid output for expressions such as object property access.

- [#&#8203;11784](biomejs/biome#11784) [`46e8912`](biomejs/biome@46e8912) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11782](biomejs/biome#11782): [`noUndeclaredCustomProperties`](https://biomejs.dev/linter/rules/no-undeclared-custom-properties/) could hang while checking stylesheets imported by JavaScript modules with many shared dependencies.

- [#&#8203;11731](biomejs/biome#11731) [`1534885`](biomejs/biome@1534885) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7984](biomejs/biome#7984): The fix from [`useSimplifiedLogicExpression`](https://biomejs.dev/linter/rules/use-simplified-logic-expression/) now preserves line breaks in multiline conditions with line comments, preventing the right-hand side condition from being commented out.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7304](biomejs/biome#7304): the HTML formatter now preserves authored segment breaks between CJK characters, and next to CJK punctuation, instead of replacing them with spaces.

  ```diff
   <div lang="zh-Hant-TW">
  -  這個段落是那麼長, 在一行寫不行。
  +  這個段落是那麼長,
  +  在一行寫不行。
   </div>
  ```

- [#&#8203;11749](biomejs/biome#11749) [`ff992a1`](biomejs/biome@ff992a1) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;11747](biomejs/biome#11747): formatting and checking large parenthesized object expressions no longer exhibit quadratic slowdowns.

- [#&#8203;11736](biomejs/biome#11736) [`1dd1fc4`](biomejs/biome@1dd1fc4) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8177](biomejs/biome#8177): code actions no longer modify the wrong part of Vue, Svelte, or Astro files when experimental full HTML support is disabled.

- [#&#8203;11743](biomejs/biome#11743) [`3835945`](biomejs/biome@3835945) Thanks [@&#8203;santichausis](https://github.com/santichausis)! - Fixed [#&#8203;10247](biomejs/biome#10247): `biome check --write`/`biome lint --write` now correctly writes fixes for code inside an HTML attribute expression (for example a Svelte `onclick={...}` handler, or a mustache expression like `{count}`), instead of silently reporting the diagnostic as fixable and applying nothing.

  For example, running `biome lint --write --unsafe` for [`useBlockStatements`](https://biomejs.dev/linter/rules/use-block-statements/) (an unsafe fix) on this Svelte component used to leave the file unchanged:

  ```svelte
  <button onclick={() => { if (open) close(); }}>Close</button>
  ```

- [#&#8203;11740](biomejs/biome#11740) [`8ea8b4a`](biomejs/biome@8ea8b4a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11453](biomejs/biome#11453): [`useConsistentTestIt`](https://biomejs.dev/linter/rules/use-consistent-test-it/) now updates imports alongside calls, preserving the original export through an alias. The rule ignores locally declared functions and withholds fixes when the preferred name would conflict with another binding or global reference.

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed the HTML formatter incorrectly applying native HTML element formatting to PascalCase component names such as `<Ul>` and `<Body>` in Vue, Svelte, and Astro files.

  ```diff
  -<Body>
  -  <div>content</div>
  -</Body>
  +<Body><div>content</div></Body>
  ```

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed the HTML formatter incorrectly applying SVG block formatting to unknown elements whose names matched SVG element names.

  ```diff
  -<foreignobject>
  -  <div>content</div>
  -</foreignobject>
  +<foreignobject><div>content</div></foreignobject>
  ```

- [#&#8203;11741](biomejs/biome#11741) [`fc69047`](biomejs/biome@fc69047) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8893](biomejs/biome#8893): [`useImportExtensions`](https://biomejs.dev/linter/rules/use-import-extensions/) no longer suggests adding `.ts` to `.jsx` imports when a colocated `.d.ts` file provides type declarations.

- [#&#8203;11642](biomejs/biome#11642) [`c87341c`](biomejs/biome@c87341c) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added the nursery rule [useConsistentFunctionStyle](https://biomejs.dev/linter/rules/use-consistent-function-style/), which requires a consistent style for defining functions.

  By default, the rule reports the following declaration because it requires a function expression assigned to a variable:

  ```js
  function greet() {
      return "Hello";
  }
  ```

- [#&#8203;11770](biomejs/biome#11770) [`ddfd622`](biomejs/biome@ddfd622) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8980](biomejs/biome#8980): suppression comments targeting the entire `assist` category are now respected, including `biome-ignore-all assist` when running `check`.

- [#&#8203;11792](biomejs/biome#11792) [`7a4b895`](biomejs/biome@7a4b895) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed dashed utility base names in the Tailwind parser, including `border-bs`, `font-features`, and `scrollbar-thumb`. Classes such as `min-inline-[12rem]` now preserve the complete base name and parse the arbitrary value separately.

- [#&#8203;11739](biomejs/biome#11739) [`1fc17e3`](biomejs/biome@1fc17e3) Thanks [@&#8203;Netail](https://github.com/Netail)! - The rule [`useIncludes`](https://biomejs.dev/linter/rules/use-includes/) now also reports `lastIndexOf()` comparisons and `some()` calls with a strict-equality callback.

  ```js
  arr.lastIndexOf(x) !== -1

  arr.some(item => item === x)
  ```

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;6888](biomejs/biome#6888). GritQL plugins can now use `contains` on import-clause metavariables such as `$clause` in `import $clause from "module"` patterns.

- [#&#8203;11790](biomejs/biome#11790) [`17d0ff0`](biomejs/biome@17d0ff0) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;11786](biomejs/biome#11786): [`useAnchorContent`](https://biomejs.dev/linter/rules/use-anchor-content/) now reports anchors without accessible content in HTML, Astro, Vue, and Svelte even when they have an `aria-label`, `aria-labelledby`, or `title` attribute, matching JSX behavior.

- [#&#8203;11651](biomejs/biome#11651) [`a9c4aa0`](biomejs/biome@a9c4aa0) Thanks [@&#8203;saberoueslati](https://github.com/saberoueslati)! - Added the new nursery rule [`noVueUndeclaredDirectives`](https://biomejs.dev/linter/rules/no-vue-undeclared-directives/), which reports custom Vue directives that are not declared by a `<script setup>` binding, the component's `directives` option, or the rule's `globals` option. Closes [#&#8203;11478](biomejs/biome#11478).

  ```vue
  <template>
    <!-- v-highlight is not declared anywhere -->
    <div v-highlight></div>
  </template>
  ```

  Aliased named imports in single-file components are now tracked under their local name, so `noUndeclaredVariables` recognizes `vHighlight` in `import { highlight as vHighlight } from "./directives"`.

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7795](biomejs/biome#7795). The [`noJsxLiterals`](https://biomejs.dev/linter/rules/no-jsx-literals/) rule now ignores surrounding whitespace when matching literals against `allowedStrings`.

- [#&#8203;11780](biomejs/biome#11780) [`99c7049`](biomejs/biome@99c7049) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed false positives in [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) when numeric cases use different spellings of the same value. For example, `case 0x1` now covers the numeric literal type `1`.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7880](biomejs/biome#7880): [`noUselessStringConcat`](https://biomejs.dev/linter/rules/no-useless-string-concat/) no longer reports literal concatenations split across multiple lines when a numeric literal ends the chain.

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Improved performance of the HTML formatter for documents that contain many HTML-native or SVG-native tags.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7949](biomejs/biome#7949): [`useReadonlyClassProperties`](https://biomejs.dev/linter/rules/use-readonly-class-properties/) now reports static class properties that are never reassigned.

- [#&#8203;11751](biomejs/biome#11751) [`d37f24b`](biomejs/biome@d37f24b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7644](biomejs/biome#7644): [`useImportExtensions`](https://biomejs.dev/linter/rules/use-import-extensions/) now resolves path aliases declared by referenced TypeScript project configurations.

- [#&#8203;11791](biomejs/biome#11791) [`f88793c`](biomejs/biome@f88793c) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed a false positive in [`useTailwindShorthandClasses`](https://biomejs.dev/linter/rules/use-tailwind-shorthand-classes/) for strings in conditional tests, such as `cn(m === "w-2 h-2" ? "bg-red-800" : "bg-red-400")`.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7783](biomejs/biome#7783): [`noNoninteractiveElementInteractions`](https://biomejs.dev/linter/rules/no-noninteractive-element-interactions/) no longer reports event handlers on native `<dialog>` elements.

- [#&#8203;11733](biomejs/biome#11733) [`7030068`](biomejs/biome@7030068) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11730](biomejs/biome#11730): [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) reports missing cases when iterating over a class property with `for...of`.

- [#&#8203;11717](biomejs/biome#11717) [`2107dae`](biomejs/biome@2107dae) Thanks [@&#8203;ternaus](https://github.com/ternaus)! - Fixed [#&#8203;11716](biomejs/biome#11716): the [`noUnknownAttribute`](https://biomejs.dev/linter/rules/no-unknown-attribute/) rule now accepts fullscreen event handlers, the `credentialless` iframe property, and the SVG `maskType` property when the React dependency range allows React 19.3 or later. The `credentialless` and `maskType` properties are restricted to `<iframe>` and `<mask>` elements, respectively.

- [#&#8203;11737](biomejs/biome#11737) [`b7e3559`](biomejs/biome@b7e3559) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11692](biomejs/biome#11692): [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/) now detects unhandled promises returned through generic method signatures, including Playwright fixtures.

- [#&#8203;11780](biomejs/biome#11780) [`99c7049`](biomejs/biome@99c7049) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7747](biomejs/biome#7747): [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) now reports missing cases for literal unions derived from const tuples with `(typeof values)[number]` and objects with `keyof typeof object`.

  Other type-aware rules, including [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/) and [`noUselessTypeConversion`](https://biomejs.dev/linter/rules/no-useless-type-conversion/), also recognize supported indexed-access results.

- [#&#8203;11724](biomejs/biome#11724) [`a9a5e9a`](biomejs/biome@a9a5e9a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed redundant parentheses around binary and logical unary operands with leading line comments.

  ```diff
   !(
     // leading
  -  (a || b)
  +  a || b
   );
  ```

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7722](biomejs/biome#7722): [`noUnusedImports`](https://biomejs.dev/linter/rules/no-unused-imports/) no longer reports type-only imports used in computed names of declared class properties.

- [#&#8203;11731](biomejs/biome#11731) [`1534885`](biomejs/biome@1534885) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;6390](biomejs/biome#6390): Biome now offers suppression actions for [`noDynamicNamespaceImportAccess`](https://biomejs.dev/linter/rules/no-dynamic-namespace-import-access/) in editors.

- [#&#8203;11751](biomejs/biome#11751) [`d37f24b`](biomejs/biome@d37f24b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7533](biomejs/biome#7533): [`noDescendingSpecificity`](https://biomejs.dev/linter/rules/no-descending-specificity/) no longer compares selector specificity across separate cascade layer blocks.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;6206](biomejs/biome#6206): [`useUniqueElementIds`](https://biomejs.dev/linter/rules/use-unique-element-ids) no longer reports static IDs on elements in SVG contexts.

  ```jsx
  <svg>
      <defs>
          <pattern id="dots" width="10" height="10" />
      </defs>
      <rect fill="url(#dots)" width="100%" height="100%" />
  </svg>
  ```

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;5447](biomejs/biome#5447), so the GitHub reporter now associates annotations with the correct files when Biome runs from a nested directory.

- [#&#8203;11720](biomejs/biome#11720) [`c7c4e2b`](biomejs/biome@c7c4e2b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7816](biomejs/biome#7816): [`useHookAtTopLevel`](https://biomejs.dev/linter/rules/use-hook-at-top-level/) no longer reports methods named like hooks when called on another function's result, such as `Reactotron.configure(...).useReactNative(...)`.

- [#&#8203;11355](biomejs/biome#11355) [`27177ca`](biomejs/biome@27177ca) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Removed special HTML formatter handling for the obsolete `<listing>` element.

- [#&#8203;11731](biomejs/biome#11731) [`1534885`](biomejs/biome@1534885) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed an issue where Grit plugin code fixes weren't available as editor code actions.

- [#&#8203;11726](biomejs/biome#11726) [`dea163f`](biomejs/biome@dea163f) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11722](biomejs/biome#11722): the JavaScript formatter inserts a newline before the closing angle bracket when a leading comment forces type arguments onto multiple lines.

  ```diff
   type Foo = Record<
     // comment
     string,
  -  number>;
  +  number
  +>;
  ```

- [#&#8203;9758](biomejs/biome#9758) [`02ea438`](biomejs/biome@02ea438) Thanks [@&#8203;Netail](https://github.com/Netail)! - Added the nursery rule [`noJsonUnsafeValues`](https://biomejs.dev/linter/rules/no-json-unsafe-values/), which disallows JSON values that are unsafe to use between different tools or languages.

  **Invalid:**

  ```json5
  [
    2e308, // Number evaluating to Infinity
    -2e308, // Number evaluating to -Infinity
    "\ud83d", // String with lone surrogate
    1e-400, // Unsafe zero (too small, will evaluate to 0)
    9007199254740992, // Unsafe integer (outside safe integer range)
    2.2250738585072009e-308, // Subnormal number
  ]
  ```

- [#&#8203;11790](biomejs/biome#11790) [`17d0ff0`](biomejs/biome@17d0ff0) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;8574](biomejs/biome#8574): the JavaScript formatter sometimes added extra parentheses and moved comments when formatting multiline expressions after operators such as `!`. Comments now stay beside the values they describe, without an extra pair of parentheses.

  ```diff
   !(
  -  (
  -    cond1 || // force this to be multi line
  -    cond3
  -  ) // comment
  +  cond1 || // force this to be multi line
  +  cond3 // comment
   );
  ```

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7711](biomejs/biome#7711): `biome lint --suppress` no longer fails with conflicting rule fixes when multiple diagnostics target a declaration preceded by a multiline comment.

- [#&#8203;11700](biomejs/biome#11700) [`0e9fe53`](biomejs/biome@0e9fe53) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added the nursery rule [`noObsoleteTags`](https://biomejs.dev/linter/rules/no-obsolete-tags/), which reports obsolete HTML elements in HTML and JSX, such as `<font color="red">Text</font>`.

- [#&#8203;11735](biomejs/biome#11735) [`9bd70c7`](biomejs/biome@9bd70c7) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7363](biomejs/biome#7363): Biome GritQL plugins now match TypeScript interface snippets such as `interface $name { $body }`.

- [#&#8203;11729](biomejs/biome#11729) [`f047985`](biomejs/biome@f047985) Thanks [@&#8203;m1handr](https://github.com/m1handr)! - Added support for `suite()` as an alias of `describe()` across test analysis rules and formatter. Rules now recognize `suite`, `fsuite`, `xsuite`, and `test.suite` blocks. The formatter recognises them as test declarations.

- [#&#8203;11778](biomejs/biome#11778) [`4b7aa1f`](biomejs/biome@4b7aa1f) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7727](biomejs/biome#7727): GritQL snippets such as `import $what from $where` now match namespace imports, including type-only imports. Explicit `import type $what from $where` patterns also match type-only named and namespace imports.

- [#&#8203;11715](biomejs/biome#11715) [`f05a3c3`](biomejs/biome@f05a3c3) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;7603](biomejs/biome#7603): [`useSingleJsDocAsterisk`](https://biomejs.dev/linter/rules/use-single-js-doc-asterisk/) no longer reports asterisks that are part of JSDoc comment content, such as italic text, as extra line markers.

- [#&#8203;11706](biomejs/biome#11706) [`e19512a`](biomejs/biome@e19512a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;11704](biomejs/biome#11704): files re-included by negation patterns in a nested `.gitignore` are processed when `vcs.useIgnoreFile` is enabled, even when the ignore file contains `*`.

- [#&#8203;11718](biomejs/biome#11718) [`76a302a`](biomejs/biome@76a302a) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;8573](biomejs/biome#8573): own-line comments before binary operators stay above the operator when `javascript.formatter.operatorLinebreak` is `"before"`.

  ```diff
   foo
  -  || // comment
  -  bar;
  +  // comment
  +  || bar;
  ```

- [#&#8203;9797](biomejs/biome#9797) [`64fd314`](biomejs/biome@64fd314) Thanks [@&#8203;Netail](https://github.com/Netail)! - Added the nursery rule [`useConsistentObjectKeys`](https://biomejs.dev/linter/rules/use-consistent-object-keys), which requires JSON object keys to follow a consistent Unicode representation.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMDUuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjEwNS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Server/pulls/45
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-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants