Skip to content

perf(formatter): avoid arena copy for borrowed string-literal text#23465

Merged
leaysgur merged 1 commit into
oxc-project:mainfrom
hyf0:perf/formatter-cleaned-string-borrowed-passthrough
Jun 16, 2026
Merged

perf(formatter): avoid arena copy for borrowed string-literal text#23465
leaysgur merged 1 commit into
oxc-project:mainfrom
hyf0:perf/formatter-cleaned-string-borrowed-passthrough

Conversation

@hyf0

@hyf0 hyf0 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What & why

Every formatted string literal flows through CleanedStringLiteralText::fmt, which copied the text
into the formatter arena unconditionally:

text(f.allocator().alloc_str(&self.text)).fmt(f);

self.text is a Cow<'a, str>, and in the common case — the literal already uses the preferred quote
style and needs no escape normalization — normalize_text returns Cow::Borrowed, a slice of the
source text that already has the 'a lifetime FormatElement::Text requires. So the alloc_str copy
is redundant for borrowed text. Pass the borrowed slice straight through and only allocate for the
owned (normalized) case:

let text_str: &'a str = match &self.text {
    Cow::Borrowed(borrowed) => borrowed,
    Cow::Owned(owned) => f.allocator().alloc_str(owned),
};
text(text_str).fmt(f);

This removes one arena allocation + memcpy per borrowed string literal and avoids duplicating the
literal's bytes into the arena (the source text already holds them). It is never more work than before:
the borrowed arm skips the allocation; the owned arm is unchanged (the added match just replaces the
implicit Cow deref the old code already performed).

Memory reduction (arena allocations)

Measured with cargo allocs (TestFiles::complicated). Only the arena-allocation count drops
system allocations, reallocs, and arena reallocs are all unchanged:

file arena allocs: before → after reduction
antd.js 2,638,108 → 2,589,031 −49,077 (−1.86%)
pdf.mjs 442,227 → 440,620 −1,607 (−0.36%)
checker.ts 1,082,132 → 1,081,176 −956 (−0.09%)
App.tsx 214,178 → 213,475 −703 (−0.33%)
kitchen-sink.tsx 572,286 → 571,980 −306 (−0.05%)
binder.ts 63,981 → 63,948 −33 (−0.05%)
RadixUIAdoptionSection.jsx 1,172 → 1,149 −23 (−1.96%)
Raw allocs_formatter.snap diff (updated in this PR)
 File                       | File size      || Sys allocs     | Sys reallocs   || Arena allocs   | Arena reallocs
 ---------------------------------------------------------------------------------------------------------------------------
-checker.ts                 | 2.92 MB        ||          18642 |            565 ||        1082132 |         118667
+checker.ts                 | 2.92 MB        ||          18642 |            565 ||        1081176 |         118667

-App.tsx                    | 415.34 kB      ||           7588 |            172 ||         214178 |          25343
+App.tsx                    | 415.34 kB      ||           7588 |            172 ||         213475 |          25343

-RadixUIAdoptionSection.jsx | 2.52 kB        ||             54 |             28 ||           1172 |            157
+RadixUIAdoptionSection.jsx | 2.52 kB        ||             54 |             28 ||           1149 |            157

-pdf.mjs                    | 567.30 kB      ||          15308 |            342 ||         442227 |          43489
+pdf.mjs                    | 567.30 kB      ||          15308 |            342 ||         440620 |          43489

-antd.js                    | 6.69 MB        ||          83239 |           4652 ||        2638108 |         302458
+antd.js                    | 6.69 MB        ||          83239 |           4652 ||        2589031 |         302458

-binder.ts                  | 193.08 kB      ||            824 |             43 ||          63981 |           6932
+binder.ts                  | 193.08 kB      ||            824 |             43 ||          63948 |           6932

-kitchen-sink.tsx           | 732.90 kB      ||          20458 |           3156 ||         572286 |          60147
+kitchen-sink.tsx           | 732.90 kB      ||          20458 |           3156 ||         571980 |          60147

Instruction count (CodSpeed) is neutral, as expected: arena bump-allocation is cheap on the CPU, so
removing the copies reduces memory/allocations without materially changing instructions. This is a
memory optimization, not a speed one.

Behavior-preserving

The same bytes reach text() in both arms. cargo test -p oxc_formatter and the prettier conformance
suite pass with byte-identical output (no snapshot churn).


Prepared with AI assistance (automated performance loop) and validated against local allocation
snapshots, benchmarks, and the prettier conformance suite; opened as a draft.

@codspeed-hq

codspeed-hq Bot commented Jun 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 52 untouched benchmarks
⏩ 19 skipped benchmarks1


Comparing hyf0:perf/formatter-cleaned-string-borrowed-passthrough (9576364) with main (09762d9)

Open in CodSpeed

Footnotes

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

@hyf0 hyf0 force-pushed the perf/formatter-cleaned-string-borrowed-passthrough branch from 90d0984 to 9576364 Compare June 16, 2026 02:31
@hyf0 hyf0 marked this pull request as ready for review June 16, 2026 03:05
@hyf0 hyf0 requested review from Dunqing and leaysgur as code owners June 16, 2026 03:05

@leaysgur leaysgur 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.

Thank you~! 👍🏻

@leaysgur leaysgur merged commit 12e4451 into oxc-project:main Jun 16, 2026
42 checks passed
hyf0 added a commit to hyf0/oxc that referenced this pull request Jun 17, 2026
…usable alloc_cow_str

Adds Allocator::alloc_cow_str(cow): returns a Cow's &str without copying when Cow::Borrowed,
copying into the arena only for Cow::Owned. Crystallizes the borrow-passthrough pattern
(string oxc-project#23465, number oxc-project#23512, bigint) into one documented, reusable helper instead of an
inline match repeated at each site.

Migrates the in-tree sites to it: oxc_formatter numeric + bigint literals, and
oxc_formatter_json::arena_cow_str (previously a local copy of the same pattern).

Behaviour- and allocation-neutral (pure consolidation); allocs snapshots unchanged.
hyf0 added a commit to hyf0/oxc that referenced this pull request Jun 17, 2026
…usable alloc_cow_str

Adds Allocator::alloc_cow_str(&cow): returns a Cow's &str without copying when Cow::Borrowed,
copying into the arena only for Cow::Owned. Crystallizes the borrow-passthrough pattern
(string oxc-project#23465, number oxc-project#23512, bigint oxc-project#23534) into one documented, reusable helper instead of
the inline match repeated at each site.

Takes the Cow by shared reference so it also works where the Cow lives behind a &self borrow
(string literals) and can't be moved out.

Migrates every in-tree site to it:
- oxc_formatter string / numeric / bigint literals
- oxc_formatter_json: removes the crate-local arena_cow_str wrapper; call sites now use the
  shared helper directly (f.allocator().alloc_cow_str(&cow)), matching how the formatters
  already call f.allocator().alloc_str(...) directly with no per-crate wrapper.

Behaviour- and allocation-neutral (pure consolidation); allocs snapshots unchanged.
leaysgur pushed a commit that referenced this pull request Jun 17, 2026
…ls (#23534)

## What

`BigIntLiteral` formatting previously **always** copied the literal text
into the arena via `alloc_str`, even though the common case — an
already-lowercase bigint such as `123n` — needs no change. This borrows
the source slice straight through and copies into the arena only when
the literal actually contains uppercase hex digits (e.g. `0xFFn`).

Mirrors the borrow-passthrough already used for string literals (#23465)
and numeric literals (#23512).

## Δ

`allocs_formatter.snap` (arena bytes): **kitchen-sink.tsx −39**. No
regression on any fixture; allocation *count* unchanged. Output is
byte-identical (prettier-conformance snapshots unchanged).

Prepared with AI assistance.
hyf0 added a commit to hyf0/oxc that referenced this pull request Jun 17, 2026
…usable alloc_cow_str

Adds Allocator::alloc_cow_str(&cow): returns a Cow's &str without copying when Cow::Borrowed,
copying into the arena only for Cow::Owned. Crystallizes the borrow-passthrough pattern
(string oxc-project#23465, number oxc-project#23512, bigint oxc-project#23534) into one documented, reusable helper instead of
the inline match repeated at each site.

Takes the Cow by shared reference so it also works where the Cow lives behind a &self borrow
(string literals) and can't be moved out.

Migrates every in-tree site to it:
- oxc_formatter string / numeric / bigint literals
- oxc_formatter_json: removes the crate-local arena_cow_str wrapper; call sites now use the
  shared helper directly (f.allocator().alloc_cow_str(&cow)), matching how the formatters
  already call f.allocator().alloc_str(...) directly with no per-crate wrapper.

Behaviour- and allocation-neutral (pure consolidation); allocs snapshots unchanged.
Boshen added a commit that referenced this pull request Jun 22, 2026
# Oxlint
### 💥 BREAKING CHANGES

- 36009dd allocator: [**BREAKING**] `GetAllocator::allocator` take
`&self` (#23676) (overlookmotel)

### 🚀 Features

- ff65285 linter: `no-restricted-globals` add missing upstream options
(#23663) (Sysix)
- 7b8bd89 linter/typescript: Implement suggestion for
`no-unnecessary-type-constraint` rule (#23646) (Mikhail Baev)
- 0dc2405 linter: Add schema for `eslint/no-restricted-properties`
(#23619) (Sysix)
- b638d0e linter: Add schema for `node/callback-return` (#23615) (Sysix)
- eb8bedc linter: Add schema for `import/extensions` (#23557)
(WaterWhisperer)
- 46f3625 linter: Implement node/no-sync rule (#23589) (fujitani sora)
- b01739a linter: Add schema for `unicorn/numeric-separators-style`
(#23554) (Mikhail Baev)
- 68afd2a linter/node: Implement `no-mixed-requires` rule (#23539)
(fujitani sora)
- 59d8893 linter: `unicorn/numeric-separators-style` support missing
options (#23524) (Sysix)
- a421215 linter: Add schema for `eslint/prefer-destructuring` (#23410)
(WaterWhisperer)
- 84438be linter/jsdoc: Added missing options to
`require-param-description` (#23416) (kapobajza)
- c145b72 linter/jsdoc/require-param-type: Implement fixer (#23513)
(camc314)
- 51910df linter/jsdoc: Add missing options to `require-param-type` rule
(#23418) (kapobajza)
- e90925f linter/unicorn: Implement prefer-number-coercion rule (#23497)
(Shekhu☺️)
- dd1c866 linter/vue: Implement no-async-in-computed-properties rule
(#23493) (bab)
- b02444e linter: Add schema for `react/jsx-no-script-url` (#23475)
(WaterWhisperer)
- 53509a8 minifier: Treeshake pure typed arrays and Set/Map array
literals (#23469) (Dunqing)
- a8dce46 linter/unicorn: Implement `max-nested-calls` rule (#23461)
(arieleli01212)

### 🐛 Bug Fixes

- b1948a1 linter/radix: Avoid panic on `parseInt` with a spread radix
argument (#23623) (Jerry Zhao)
- f28ccfd linter/prefer-query-selector: Use a compound selector for
multiple classes (#23628) (Jerry Zhao)
- 13f2970 linter/prefer-numeric-literals: Avoid panic on `parseInt` with
a spread radix argument (#23624) (Jerry Zhao)
- 57612b3 linter: Report invalid capitalized-comments ignore patterns
(#23608) (camc314)
- 800ee2a linter/consistent-vitest-vi: Preserve import aliases when
rewriting the import (#23568) (Yunfei He)
- f78b5e1 linter/consistent-indexed-object-style: Don't leak a stray
comma into the value type (#23566) (Yunfei He)
- 6b104e8 linter/radix: Detect a trailing comma only after the argument
(#23569) (Yunfei He)
- 2de20cb linter/unicorn/prefer-at: Correct two-argument `slice().pop()`
index (#23565) (Yunfei He)
- de778ec linter: `unicorn/numeric-separators-style` preserve dot for
floats without decial part (#23553) (Sysix)
- 651027c linter/curly: Remove only the block's own braces (#23580)
(Yunfei He)
- 687e835 linter/array-type: Parenthesize a conditional-type element
(#23579) (Yunfei He)
- 9c80dff linter/unicorn/no-unnecessary-await: Don't paste operators
into invalid syntax (#23556) (Yunfei He)
- 46e1463 linter/no-compare-neg-zero: Delete the `-` of a parenthesized
`-0` (#23578) (Yunfei He)
- d172a97 linter/unicorn/prefer-math-trunk: Skip fixer for LHS with side
effects (#23548) (camc314)
- 1c3a9bd linter/unicorn/prefer-negative-index: Don't report
`Array#with` (#23518) (Yunfei He)
- c17db5d linter/unicorn/prefer-spread: Don't report `.slice()` on
non-array receivers (#23520) (Yunfei He)
- 9cd0c2f linter/unicorn/prefer-date-now: Keep `BigInt` wrapper when
fixing `BigInt(new Date())` (#23523) (Yunfei He)
- 16bb890 linter/unicorn/prefer-array-flat: Skip non-array `flatMap`
receivers (#23527) (Yunfei He)
- 3e6f90f linter/unicorn/no-zero-fractions: Insert a space after any
preceding keyword (#23529) (Yunfei He)
- 79a7d69 linter/eslint/no-useless-assignment: Handle exceptional
control-flow paths (#23544) (camc314)
- e8e2741 linter/unicorn/prefer-math-min-max: Preserve operand source
text in the fix (#23533) (Yunfei He)
- f592154 linter/react/display-name: Ignore lowercase jsx helpers
(#23510) (camc314)
- df7612f linter/jsx-a11y/no-noninteractive-element-to-interactive-role:
Allow custom roles config (#23507) (camc314)
- 924b931 linter/unicorn/prefer-at: Handle checking all indexes
correctly (#23504) (camc314)
- ca9686b linter/unicorn/prefer-at: Report zero indexes (#23503)
(camc314)
- e96a4e3 linter/unicorn/explicit-length-check: Ignore optional chains
(#23487) (camc314)
- a303c23 linter/jsx-a11y: Align `anchor-is-valid` config with upstream
(#23446) (camc314)
- f27a6d1 linter: False positives with non `*.setTimeout` call in
`no-confusing-set-timeout` (#23444) (camc314)

### ⚡ Performance

- 8e0dd65 linter: Emit RuleEnum dispatch match once instead of per
timing branch (#23499) (Boshen)
- d5c7d99 linter/expect-expect: Avoid recompiling matches on every
traversal (#23593) (camc314)
- f191520 linter/no-useless-spread: Avoid collecting `Vec` before
iterating (#23546) (camc314)
- 79340d1 linter: Stream React lifecycle ancestors (#23545) (camc314)
- 1923169 linter/eslint/max-classes: Gate rule by rule config threshold
(#23509) (camc314)
- 3f60de3 linter: Use bucketed dispatch for all files (#23452) (camc314)
- 3699971
linter/typescript/no-unnecessary-parameter-property-assignment: Avoid
temporary vec allocations (#23492) (camc314)
- 4ef0ceb linter/eslint/no-useless-switch-case: Avoid temporary vec
allocations (#23489) (camc314)
- 2e09dd3 linter: Avoid JSX fragment child collections (#23486)
(camc314)
- f30a64c linter/oxc/branches-sharing-code: Borrow shared branch
suggestion text (#23484) (camc314)
- 097a317 linter/eslint/no-control-regex: Retain control regex
candidates in place (#23482) (camc314)
- b3a093d linter: Reuse rule dispatch buckets (#23450) (camc314)
- 9f1a985 oxlint: Start Tokio only for LSP (#23447) (camc314)

### 📚 Documentation

- 9e219de linter/plugins: Update usage instruction (#23495) (Tony)
- b50bf4d linter: Remove manually written options doc for
`eslint/arrow-body-style` (#23490) (Mikhail Baev)
# Oxfmt
### 💥 BREAKING CHANGES

- 36009dd allocator: [**BREAKING**] `GetAllocator::allocator` take
`&self` (#23676) (overlookmotel)

### 🐛 Bug Fixes

- f21ed2c formatter_json: Normalize CRLF for suppressed text (#23702)
(leaysgur)
- 7cd1737 formatter: Normalize CRLF for suppressed text (#23701)
(leaysgur)
- a36e444 formatter: Member chain panic when tail is merged with comment
in dev build (#23698) (leaysgur)
- 600d306 formatter: Preserve parens with default export and type cast
(#23697) (leaysgur)
- 61290f2 formatter: Single-member intersection/union type with comment
formatting (#21915) (Leonabcd123)
- 5a1b0b4 formatter: Parenthesize a type assertion used as the base of
`**` (#23633) (Jerry Zhao)
- 91827e2 formatter: Use `Ordering::reverse()` with `order: desc` for
idempotency (#23543) (leaysgur)
- 8fa7394 formatter_json: Handle wrapped error span (#23472) (leaysgur)
- 37a34a1 oxfmt/lsp: Avoid newlines line ending changes (#23463) (Sysix)

### ⚡ Performance

- 80f1697 formatter: Avoid arena copy for already-lowercase bigint
literals (#23534) (Yunfei He)
- 1a40b71 formatter: Avoid arena copy for borrowed numeric-literal text
(#23512) (Yunfei He)
- 12e4451 formatter: Avoid arena copy for borrowed string-literal text
(#23465) (Yunfei He)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
camc314 pushed a commit that referenced this pull request Jul 3, 2026
…23465)

## What & why

Every formatted string literal flows through
`CleanedStringLiteralText::fmt`, which copied the text
into the formatter arena unconditionally:

```rust
text(f.allocator().alloc_str(&self.text)).fmt(f);
```

`self.text` is a `Cow<'a, str>`, and in the common case — the literal
already uses the preferred quote
style and needs no escape normalization — `normalize_text` returns
`Cow::Borrowed`, a slice of the
source text that already has the `'a` lifetime `FormatElement::Text`
requires. So the `alloc_str` copy
is redundant for borrowed text. Pass the borrowed slice straight through
and only allocate for the
owned (normalized) case:

```rust
let text_str: &'a str = match &self.text {
    Cow::Borrowed(borrowed) => borrowed,
    Cow::Owned(owned) => f.allocator().alloc_str(owned),
};
text(text_str).fmt(f);
```

This removes one arena allocation + memcpy per borrowed string literal
and avoids duplicating the
literal's bytes into the arena (the source text already holds them). It
is never more work than before:
the borrowed arm skips the allocation; the owned arm is unchanged (the
added `match` just replaces the
implicit `Cow` deref the old code already performed).

## Memory reduction (arena allocations)

Measured with `cargo allocs` (`TestFiles::complicated`). **Only the
arena-allocation count drops** —
system allocations, reallocs, and arena reallocs are all unchanged:

| file | arena allocs: before → after | **reduction** |
| --- | --- | --- |
| antd.js | 2,638,108 → 2,589,031 | **−49,077 (−1.86%)** |
| pdf.mjs | 442,227 → 440,620 | **−1,607 (−0.36%)** |
| checker.ts | 1,082,132 → 1,081,176 | **−956 (−0.09%)** |
| App.tsx | 214,178 → 213,475 | **−703 (−0.33%)** |
| kitchen-sink.tsx | 572,286 → 571,980 | **−306 (−0.05%)** |
| binder.ts | 63,981 → 63,948 | **−33 (−0.05%)** |
| RadixUIAdoptionSection.jsx | 1,172 → 1,149 | **−23 (−1.96%)** |

<details><summary>Raw <code>allocs_formatter.snap</code> diff (updated
in this PR)</summary>

```diff
 File                       | File size      || Sys allocs     | Sys reallocs   || Arena allocs   | Arena reallocs
 ---------------------------------------------------------------------------------------------------------------------------
-checker.ts                 | 2.92 MB        ||          18642 |            565 ||        1082132 |         118667
+checker.ts                 | 2.92 MB        ||          18642 |            565 ||        1081176 |         118667

-App.tsx                    | 415.34 kB      ||           7588 |            172 ||         214178 |          25343
+App.tsx                    | 415.34 kB      ||           7588 |            172 ||         213475 |          25343

-RadixUIAdoptionSection.jsx | 2.52 kB        ||             54 |             28 ||           1172 |            157
+RadixUIAdoptionSection.jsx | 2.52 kB        ||             54 |             28 ||           1149 |            157

-pdf.mjs                    | 567.30 kB      ||          15308 |            342 ||         442227 |          43489
+pdf.mjs                    | 567.30 kB      ||          15308 |            342 ||         440620 |          43489

-antd.js                    | 6.69 MB        ||          83239 |           4652 ||        2638108 |         302458
+antd.js                    | 6.69 MB        ||          83239 |           4652 ||        2589031 |         302458

-binder.ts                  | 193.08 kB      ||            824 |             43 ||          63981 |           6932
+binder.ts                  | 193.08 kB      ||            824 |             43 ||          63948 |           6932

-kitchen-sink.tsx           | 732.90 kB      ||          20458 |           3156 ||         572286 |          60147
+kitchen-sink.tsx           | 732.90 kB      ||          20458 |           3156 ||         571980 |          60147
```

</details>

Instruction count (CodSpeed) is neutral, as expected: arena
bump-allocation is cheap on the CPU, so
removing the copies reduces memory/allocations without materially
changing instructions. This is a
memory optimization, not a speed one.

## Behavior-preserving

The same bytes reach `text()` in both arms. `cargo test -p
oxc_formatter` and the prettier conformance
suite pass with byte-identical output (no snapshot churn).

---
Prepared with AI assistance (automated performance loop) and validated
against local allocation
snapshots, benchmarks, and the prettier conformance suite; opened as a
draft.
camc314 pushed a commit that referenced this pull request Jul 3, 2026
…ls (#23534)

## What

`BigIntLiteral` formatting previously **always** copied the literal text
into the arena via `alloc_str`, even though the common case — an
already-lowercase bigint such as `123n` — needs no change. This borrows
the source slice straight through and copies into the arena only when
the literal actually contains uppercase hex digits (e.g. `0xFFn`).

Mirrors the borrow-passthrough already used for string literals (#23465)
and numeric literals (#23512).

## Δ

`allocs_formatter.snap` (arena bytes): **kitchen-sink.tsx −39**. No
regression on any fixture; allocation *count* unchanged. Output is
byte-identical (prettier-conformance snapshots unchanged).

Prepared with AI assistance.
camc314 pushed a commit that referenced this pull request Jul 3, 2026
# Oxlint
### 💥 BREAKING CHANGES

- 36009dd allocator: [**BREAKING**] `GetAllocator::allocator` take
`&self` (#23676) (overlookmotel)

### 🚀 Features

- ff65285 linter: `no-restricted-globals` add missing upstream options
(#23663) (Sysix)
- 7b8bd89 linter/typescript: Implement suggestion for
`no-unnecessary-type-constraint` rule (#23646) (Mikhail Baev)
- 0dc2405 linter: Add schema for `eslint/no-restricted-properties`
(#23619) (Sysix)
- b638d0e linter: Add schema for `node/callback-return` (#23615) (Sysix)
- eb8bedc linter: Add schema for `import/extensions` (#23557)
(WaterWhisperer)
- 46f3625 linter: Implement node/no-sync rule (#23589) (fujitani sora)
- b01739a linter: Add schema for `unicorn/numeric-separators-style`
(#23554) (Mikhail Baev)
- 68afd2a linter/node: Implement `no-mixed-requires` rule (#23539)
(fujitani sora)
- 59d8893 linter: `unicorn/numeric-separators-style` support missing
options (#23524) (Sysix)
- a421215 linter: Add schema for `eslint/prefer-destructuring` (#23410)
(WaterWhisperer)
- 84438be linter/jsdoc: Added missing options to
`require-param-description` (#23416) (kapobajza)
- c145b72 linter/jsdoc/require-param-type: Implement fixer (#23513)
(camc314)
- 51910df linter/jsdoc: Add missing options to `require-param-type` rule
(#23418) (kapobajza)
- e90925f linter/unicorn: Implement prefer-number-coercion rule (#23497)
(Shekhu☺️)
- dd1c866 linter/vue: Implement no-async-in-computed-properties rule
(#23493) (bab)
- b02444e linter: Add schema for `react/jsx-no-script-url` (#23475)
(WaterWhisperer)
- 53509a8 minifier: Treeshake pure typed arrays and Set/Map array
literals (#23469) (Dunqing)
- a8dce46 linter/unicorn: Implement `max-nested-calls` rule (#23461)
(arieleli01212)

### 🐛 Bug Fixes

- b1948a1 linter/radix: Avoid panic on `parseInt` with a spread radix
argument (#23623) (Jerry Zhao)
- f28ccfd linter/prefer-query-selector: Use a compound selector for
multiple classes (#23628) (Jerry Zhao)
- 13f2970 linter/prefer-numeric-literals: Avoid panic on `parseInt` with
a spread radix argument (#23624) (Jerry Zhao)
- 57612b3 linter: Report invalid capitalized-comments ignore patterns
(#23608) (camc314)
- 800ee2a linter/consistent-vitest-vi: Preserve import aliases when
rewriting the import (#23568) (Yunfei He)
- f78b5e1 linter/consistent-indexed-object-style: Don't leak a stray
comma into the value type (#23566) (Yunfei He)
- 6b104e8 linter/radix: Detect a trailing comma only after the argument
(#23569) (Yunfei He)
- 2de20cb linter/unicorn/prefer-at: Correct two-argument `slice().pop()`
index (#23565) (Yunfei He)
- de778ec linter: `unicorn/numeric-separators-style` preserve dot for
floats without decial part (#23553) (Sysix)
- 651027c linter/curly: Remove only the block's own braces (#23580)
(Yunfei He)
- 687e835 linter/array-type: Parenthesize a conditional-type element
(#23579) (Yunfei He)
- 9c80dff linter/unicorn/no-unnecessary-await: Don't paste operators
into invalid syntax (#23556) (Yunfei He)
- 46e1463 linter/no-compare-neg-zero: Delete the `-` of a parenthesized
`-0` (#23578) (Yunfei He)
- d172a97 linter/unicorn/prefer-math-trunk: Skip fixer for LHS with side
effects (#23548) (camc314)
- 1c3a9bd linter/unicorn/prefer-negative-index: Don't report
`Array#with` (#23518) (Yunfei He)
- c17db5d linter/unicorn/prefer-spread: Don't report `.slice()` on
non-array receivers (#23520) (Yunfei He)
- 9cd0c2f linter/unicorn/prefer-date-now: Keep `BigInt` wrapper when
fixing `BigInt(new Date())` (#23523) (Yunfei He)
- 16bb890 linter/unicorn/prefer-array-flat: Skip non-array `flatMap`
receivers (#23527) (Yunfei He)
- 3e6f90f linter/unicorn/no-zero-fractions: Insert a space after any
preceding keyword (#23529) (Yunfei He)
- 79a7d69 linter/eslint/no-useless-assignment: Handle exceptional
control-flow paths (#23544) (camc314)
- e8e2741 linter/unicorn/prefer-math-min-max: Preserve operand source
text in the fix (#23533) (Yunfei He)
- f592154 linter/react/display-name: Ignore lowercase jsx helpers
(#23510) (camc314)
- df7612f linter/jsx-a11y/no-noninteractive-element-to-interactive-role:
Allow custom roles config (#23507) (camc314)
- 924b931 linter/unicorn/prefer-at: Handle checking all indexes
correctly (#23504) (camc314)
- ca9686b linter/unicorn/prefer-at: Report zero indexes (#23503)
(camc314)
- e96a4e3 linter/unicorn/explicit-length-check: Ignore optional chains
(#23487) (camc314)
- a303c23 linter/jsx-a11y: Align `anchor-is-valid` config with upstream
(#23446) (camc314)
- f27a6d1 linter: False positives with non `*.setTimeout` call in
`no-confusing-set-timeout` (#23444) (camc314)

### ⚡ Performance

- 8e0dd65 linter: Emit RuleEnum dispatch match once instead of per
timing branch (#23499) (Boshen)
- d5c7d99 linter/expect-expect: Avoid recompiling matches on every
traversal (#23593) (camc314)
- f191520 linter/no-useless-spread: Avoid collecting `Vec` before
iterating (#23546) (camc314)
- 79340d1 linter: Stream React lifecycle ancestors (#23545) (camc314)
- 1923169 linter/eslint/max-classes: Gate rule by rule config threshold
(#23509) (camc314)
- 3f60de3 linter: Use bucketed dispatch for all files (#23452) (camc314)
- 3699971
linter/typescript/no-unnecessary-parameter-property-assignment: Avoid
temporary vec allocations (#23492) (camc314)
- 4ef0ceb linter/eslint/no-useless-switch-case: Avoid temporary vec
allocations (#23489) (camc314)
- 2e09dd3 linter: Avoid JSX fragment child collections (#23486)
(camc314)
- f30a64c linter/oxc/branches-sharing-code: Borrow shared branch
suggestion text (#23484) (camc314)
- 097a317 linter/eslint/no-control-regex: Retain control regex
candidates in place (#23482) (camc314)
- b3a093d linter: Reuse rule dispatch buckets (#23450) (camc314)
- 9f1a985 oxlint: Start Tokio only for LSP (#23447) (camc314)

### 📚 Documentation

- 9e219de linter/plugins: Update usage instruction (#23495) (Tony)
- b50bf4d linter: Remove manually written options doc for
`eslint/arrow-body-style` (#23490) (Mikhail Baev)
# Oxfmt
### 💥 BREAKING CHANGES

- 36009dd allocator: [**BREAKING**] `GetAllocator::allocator` take
`&self` (#23676) (overlookmotel)

### 🐛 Bug Fixes

- f21ed2c formatter_json: Normalize CRLF for suppressed text (#23702)
(leaysgur)
- 7cd1737 formatter: Normalize CRLF for suppressed text (#23701)
(leaysgur)
- a36e444 formatter: Member chain panic when tail is merged with comment
in dev build (#23698) (leaysgur)
- 600d306 formatter: Preserve parens with default export and type cast
(#23697) (leaysgur)
- 61290f2 formatter: Single-member intersection/union type with comment
formatting (#21915) (Leonabcd123)
- 5a1b0b4 formatter: Parenthesize a type assertion used as the base of
`**` (#23633) (Jerry Zhao)
- 91827e2 formatter: Use `Ordering::reverse()` with `order: desc` for
idempotency (#23543) (leaysgur)
- 8fa7394 formatter_json: Handle wrapped error span (#23472) (leaysgur)
- 37a34a1 oxfmt/lsp: Avoid newlines line ending changes (#23463) (Sysix)

### ⚡ Performance

- 80f1697 formatter: Avoid arena copy for already-lowercase bigint
literals (#23534) (Yunfei He)
- 1a40b71 formatter: Avoid arena copy for borrowed numeric-literal text
(#23512) (Yunfei He)
- 12e4451 formatter: Avoid arena copy for borrowed string-literal text
(#23465) (Yunfei He)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants