Skip to content

feat(lint/js): add useMathMinMax#9926

Open
dyc3 wants to merge 1 commit intomainfrom
dyc3/useMathMinMax
Open

feat(lint/js): add useMathMinMax#9926
dyc3 wants to merge 1 commit intomainfrom
dyc3/useMathMinMax

Conversation

@dyc3
Copy link
Copy Markdown
Contributor

@dyc3 dyc3 commented Apr 11, 2026

Summary

This adds useMathMinMax which is a port of https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md

generated by gpt 5.4

Test Plan

snapshots

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 11, 2026

🦋 Changeset detected

Latest commit: 3d8bf6c

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-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs 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-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Apr 11, 2026
@dyc3 dyc3 marked this pull request as draft April 11, 2026 16:53
@dyc3 dyc3 force-pushed the dyc3/useMathMinMax branch from b7c1208 to 62e26af Compare April 11, 2026 16:58
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 11, 2026

Merging this PR will not alter performance

✅ 59 untouched benchmarks
⏩ 195 skipped benchmarks1


Comparing dyc3/useMathMinMax (3d8bf6c) with main (9956f1d)

Open in CodSpeed

Footnotes

  1. 195 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 the A-CLI Area: CLI label Apr 11, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

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 new nursery lint rule useMathMinMax with an associated PreferredMathMethod enum and UseMathMinMaxOptions config. The rule detects ternary expressions that select the numeric min/max via comparisons, rejects non-numeric operands and shadowed Math, unwraps TypeScript assertions for matching, emits diagnostics (Warning, FixKind::Unsafe) and provides fixes replacing conditionals with Math.min()/Math.max() while preserving comment trivia. Adds rule exports, tests (JS/TS valid and invalid fixtures), and a Changesets entry for a patch release.

Suggested reviewers

  • ematipico
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: adding a new useMathMinMax lint rule to the JavaScript analyzer.
Description check ✅ Passed The description explains the motivation (porting an ESLint rule), acknowledges AI assistance, and references the test plan, all directly related to the changeset.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dyc3/useMathMinMax

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs`:
- Line 15: Replace the public empty options struct/type UseMathMinMaxOptions
with a simple alias type Options = () in the rule module so the rule uses a unit
options type until real settings exist; remove the now-unnecessary
crates/biome_rule_options::use_math_min_max module and its export from the
options lib (and apply the same change to the other similar rule definitions
referenced around lines 61–65) to avoid extra API surface and codegen churn,
ensuring any references to UseMathMinMaxOptions are updated to Options.
🪄 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: db2224cf-8313-49bc-9087-d7220efce4f0

📥 Commits

Reviewing files that changed from the base of the PR and between 0d0e611 and b7c1208.

⛔ Files ignored due to path filters (9)
  • 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_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts.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 (8)
  • .changeset/hot-seas-jump.md
  • crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_math_min_max.rs

Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
@dyc3 dyc3 marked this pull request as ready for review April 11, 2026 17:31
@dyc3 dyc3 requested review from a team April 11, 2026 17:32
Copy link
Copy Markdown
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: 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 `@crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs`:
- Around line 107-112: The rule currently constructs a hard-coded Math.min/max
callee without checking for a local binding named "Math"; add a semantic guard
that bails out if "Math" is shadowed in the current scope. Before constructing
the AnyJsExpression::JsStaticMemberExpression (the
make::js_identifier_expression(make::js_reference_identifier(make::ident("Math")))
call) or before applying the fix, query the semantic/scope/binding API in this
lint (the function handling the node) to see if an identifier binding for "Math"
exists in the lexical scope and return/skip the rule if it does, ensuring you do
not emit the Math.min/max replacement when a local "Math" is defined.
- Around line 114-117: The current fix strips and discards trivia via
clean_argument(...) and replace_node_discard_trivia(...), which removes inner
comments inside conditionals (e.g., a > /*keep*/ b ? b : a); update the logic in
the use_math_min_max lint to preserve comments by first detecting comments on
the conditional and its operands (check the comparison.left/right and the
ternary/conditional node for any leading/trailing comment trivia) and if any
comments are present, skip performing the replacement; alternatively, if you
want to keep the transform, use a replacement API that preserves trivia (instead
of replace_node_discard_trivia) and ensure you transfer the original node's
trivia when inserting args from clean_argument; apply the same change to the
other affected blocks (the similar code at the regions around the other two
diffs you noted).
- Around line 193-198: The AST equality check using is_node_equal for left/right
vs consequent/alternate is too permissive because it allows matching
non-idempotent expressions (e.g. foo(), i++), so before returning Min/Max ensure
both compared operands are side-effect-free/idempotent: add or call a purity
predicate (e.g. is_pure_expression / is_idempotent) on left, right, consequent,
and alternate and only accept matches when the corresponding nodes are pure;
update the matching logic around the is_node_equal checks in use_math_min_max
(the left_matches_* and right_matches_* logic and the subsequent branch that
returns Min/Max) to short-circuit if any involved expression is not pure, and
apply the same guard to the analogous checks in the 200-218 block.
🪄 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: 1fc5045c-5e05-4e98-b853-08587ba9de4b

📥 Commits

Reviewing files that changed from the base of the PR and between b7c1208 and 62e26af.

⛔ Files ignored due to path filters (10)
  • 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_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts.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 (8)
  • .changeset/hot-seas-jump.md
  • crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_math_min_max.rs
✅ Files skipped from review due to trivial changes (5)
  • .changeset/hot-seas-jump.md
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js
  • crates/biome_rule_options/src/use_math_min_max.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts

Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs Outdated
Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs Outdated
Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
@dyc3 dyc3 force-pushed the dyc3/useMathMinMax branch from 62e26af to 48a5dca Compare April 12, 2026 13:54
Copy link
Copy Markdown
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

♻️ Duplicate comments (2)
crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs (2)

210-252: ⚠️ Potential issue | 🟠 Major

Branch-only inner comments can still disappear.

This only merges edge trivia from the other occurrence. If the non-selected copy carries an interior comment, for example a + b > c ? c : a + /* keep */ b, is_node_equal still matches but the replacement is built from condition_expression, so that comment vanishes. Please either skip the action when either matched operand contains interior comments, or preserve the full matched subtree instead of only its edge trivia.

Also applies to: 281-313

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

In `@crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs` around lines
210 - 252, The replacement can drop interior comments (e.g., a + /* keep */ b)
because build_argument_expression only preserves edge trivia; modify
build_argument_expression (and similarly the other occurrence around lines
281-313) to skip producing a replacement when either matched operand contains
interior comments: add a helper (e.g., has_interior_comments) that inspects the
operand subtree for non-edge comments (or uses comment_pieces for interior
positions) for both condition_expression and branch_expression, and if either
returns true, return None instead of constructing argument; keep existing uses
of clean_argument, separator_comment_pieces, prepend_trivia_pieces and
append_trivia_pieces unchanged.

387-392: ⚠️ Potential issue | 🔴 Critical

Still needs a repeatability guard.

is_node_equal will also match foo() > b ? b : foo(), obj.value > b ? b : obj.value, or i++ > b ? b : i++. The ternary may evaluate the chosen side again; Math.min/max evaluates each operand once. Please require the matched operands and branches to be repeatable/idempotent before returning Min or Max.

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

In `@crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs` around lines
387 - 392, The current equality checks (is_node_equal on left/right vs
consequent/alternate) can match expressions that are not repeatable (e.g.,
foo(), i++), causing semantic change when replacing the ternary with
Math.min/Math.max; add a repeatability guard before constructing Min/Max:
implement or call a helper (e.g., is_repeatable_expression or
is_idempotent_node) and require that the matched nodes left, right, consequent,
and alternate (the symbols left, right, consequent, alternate and the equality
checks
left_matches_consequent/left_matches_alternate/right_matches_consequent/right_matches_alternate)
are repeatable/idempotent when determining Min or Max, returning no lint if any
involved expression is not repeatable.
🤖 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_js_analyze/src/lint/nursery/use_math_min_max.rs`:
- Around line 429-436: The function has_unsupported_operand currently only
checks for bigint and Date types, allowing direct non-number literals like
strings or booleans to slip through. To fix this, update has_unsupported_operand
to also return true if is_non_number_literal detects a non-number literal in the
expression. This ensures any obvious non-number literals are properly excluded
from Math.min/Math.max usage. Make the same change in the analogous code block
around lines 557-563.

---

Duplicate comments:
In `@crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs`:
- Around line 210-252: The replacement can drop interior comments (e.g., a + /*
keep */ b) because build_argument_expression only preserves edge trivia; modify
build_argument_expression (and similarly the other occurrence around lines
281-313) to skip producing a replacement when either matched operand contains
interior comments: add a helper (e.g., has_interior_comments) that inspects the
operand subtree for non-edge comments (or uses comment_pieces for interior
positions) for both condition_expression and branch_expression, and if either
returns true, return None instead of constructing argument; keep existing uses
of clean_argument, separator_comment_pieces, prepend_trivia_pieces and
append_trivia_pieces unchanged.
- Around line 387-392: The current equality checks (is_node_equal on left/right
vs consequent/alternate) can match expressions that are not repeatable (e.g.,
foo(), i++), causing semantic change when replacing the ternary with
Math.min/Math.max; add a repeatability guard before constructing Min/Max:
implement or call a helper (e.g., is_repeatable_expression or
is_idempotent_node) and require that the matched nodes left, right, consequent,
and alternate (the symbols left, right, consequent, alternate and the equality
checks
left_matches_consequent/left_matches_alternate/right_matches_consequent/right_matches_alternate)
are repeatable/idempotent when determining Min or Max, returning no lint if any
involved expression is not repeatable.
🪄 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: e66fb192-17c6-4d49-9cd2-45af9ea07a7c

📥 Commits

Reviewing files that changed from the base of the PR and between 62e26af and 48a5dca.

⛔ Files ignored due to path filters (10)
  • 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_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts.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 (8)
  • .changeset/hot-seas-jump.md
  • crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_math_min_max.rs
✅ Files skipped from review due to trivial changes (6)
  • .changeset/hot-seas-jump.md
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts
  • crates/biome_rule_options/src/use_math_min_max.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js

Comment thread crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs Outdated
@dyc3 dyc3 force-pushed the dyc3/useMathMinMax branch 2 times, most recently from 692542f to 85887c3 Compare April 12, 2026 16:35
Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs (1)

479-480: Minor: Use /// for doc comment consistency.

Other functions in this file use /// doc comments. This one uses //.

♻️ Suggested fix
-// Is it a `bigint` literal or a `BigInt()` call? Math.min/max don't work with bigints, so we want to
-// avoid suggesting a replacement that would break the code.
+/// Is it a `bigint` literal or a `BigInt()` call? Math.min/max don't work with bigints, so we want to
+/// avoid suggesting a replacement that would break the code.
 fn is_bigint_like(expression: &AnyJsExpression) -> bool {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs` around lines
479 - 480, Replace the plain `//` comment preceding the bigint-check with a
`///` doc comment to match the file's doc-comment style; specifically, convert
the comment that reads "Is it a `bigint` literal or a `BigInt()` call?
Math.min/max don't work with bigints, so we want to avoid suggesting a
replacement that would break the code." into a `///` documentation comment above
the associated function or block (the comment near the bigint check in
use_math_min_max.rs) so it follows the same `///` format used by other functions
in this file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs`:
- Around line 479-480: Replace the plain `//` comment preceding the bigint-check
with a `///` doc comment to match the file's doc-comment style; specifically,
convert the comment that reads "Is it a `bigint` literal or a `BigInt()` call?
Math.min/max don't work with bigints, so we want to avoid suggesting a
replacement that would break the code." into a `///` documentation comment above
the associated function or block (the comment near the bigint check in
use_math_min_max.rs) so it follows the same `///` format used by other functions
in this file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7213e3d0-a21b-48ac-8be9-680ae3cef261

📥 Commits

Reviewing files that changed from the base of the PR and between 48a5dca and 692542f.

⛔ Files ignored due to path filters (10)
  • 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_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts.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 (8)
  • .changeset/hot-seas-jump.md
  • crates/biome_js_analyze/src/lint/nursery/use_math_min_max.rs
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_math_min_max.rs
✅ Files skipped from review due to trivial changes (5)
  • .changeset/hot-seas-jump.md
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_math_min_max.rs
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/valid.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.ts
  • crates/biome_js_analyze/tests/specs/nursery/useMathMinMax/invalid.js

@dyc3 dyc3 force-pushed the dyc3/useMathMinMax branch from 85887c3 to 3d8bf6c Compare April 20, 2026 13:34
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-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants