Commit Graph

19983 Commits

Author SHA1 Message Date
autofix-ci[bot] 452a3edcd7 [autofix.ci] apply automated fixes 2026-08-19 13:41:26 +00:00
Cameron 10077eb4d5 u 2026-08-19 14:40:01 +01:00
Cameron 687c06e219 u 2026-08-19 13:36:54 +01:00
Cameron 3b6ee86b1b u 2026-08-19 11:40:22 +01:00
Cameron bc305f7c32 perf test 2026-08-19 11:24:54 +01:00
camc314 8e2b3bebcc refactor(codegen): remove Buffer dependency from source maps (#25914)
## Summary

- replace Node.js `Buffer` storage with `Uint8Array` in the source-map encoder
- use `TextDecoder` to create the final mappings string
- use `Uint8Array#set` when growing the mappings buffer
- remove the `node:buffer` runtime dependency

This makes source-map generation runtime-neutral and removes a blocker for browser support for the codegen package.

## Performance

Indexed access, copying, and ASCII decoding have comparable performance. `Uint8Array` allocation requires zero-initialization, unlike `Buffer.allocUnsafe`, but the expected end-to-end impact is small.
2026-08-19 08:55:18 +00:00
camc314 cc2fab6fa5 refactor(codegen): use Uint8Array for base64 lookup table (#25913)
## Summary

Replace the `Buffer`-backed base64 character-code table with a `Uint8Array`.

`BASE64_CODES` is only used as a lookup table mapping VLQ digits from `0–63` to ASCII byte values. It does not require any `Buffer`-specific APIs, and `Uint8Array` provides the same indexed byte semantics in both Node.js and browsers.

This reduces unnecessary Node-specific usage and is a small step toward making `oxc-codegen` browser-compatible. The hot encoding loop remains unchanged; only the one-time lookup-table initialization differs.

This does not remove the remaining `Buffer` dependency used for the source-map output buffer.
2026-08-19 08:41:21 +00:00
oxc-guard 0389c4010e release(crates): oxc v0.146.0 (#25912)
### 🚀 Features

- 83cb516 minifier: Improve negation of expressions in boolean context (#25755) (Armano)

### 🐛 Bug Fixes

- 134fb22 isolated-declarations: Preserve unresolved parameter types (#25909) (Dunqing)
- 526c2b3 codegen: Remove deprecated test APIs (#25889) (camc314)
- 344a9b2 codegen: Align enum template sourcemaps (#25872) (camc314)

### ⚡ Performance

- 5ef0c93 minifier: Unwrap all unary exprs without creating dummy expressions (#25891) (Armano)
- 8783524 packages/codegen: Remove loop from `growMappingBuffer` (#25886) (overlookmotel)
- b6b14c0 packages/codegen: Remove redundant branch (#25885) (overlookmotel)
- be6adf0 packages/sourcemap: Make `location` passed to `recordSourceMapping` always a number (#25884) (overlookmotel)
- f720f15 packages/codegen: Take named-mapping only code off hot path in `recordSourceMapping` (#25883) (overlookmotel)
- a734af5 packages/codegen: Remove redundant setting of `last` in `printImportAttributes` and `printIf` (#25882) (overlookmotel)
- c6e44c6 packages/codegen: Combine 2 writes in `printJSXElement` (#25881) (overlookmotel)
- 8801662 packages/codegen: Remove redundant mapping from `printParams` (#25880) (overlookmotel)

### 📚 Documentation

- 5ad330e packages/codegen: Reformat comments (#25876) (overlookmotel)
crates_v0.146.0
2026-08-19 08:29:51 +00:00
camc314 b016583d78 refactor(codegen): use magicString to preserve mappings in strip-ts (#25870)
## Summary

Preserve source maps when `strip-ts` removes TypeScript-only printer regions from JS builds.

The plugin now uses Rolldown’s `magicString` transform context instead of a plain string replacement, so removed `/* IF TS */` regions retain correct mappings back to the original printer source.
2026-08-19 08:24:14 +00:00
camc314 82a790d7a0 fix(codegen): narrow printSync input type (#25871)
## Summary
- narrow the public `printSync` input type to `ESTree.Program | ESTree.Statement`
- document the supported input type in the package README
2026-08-19 08:18:26 +00:00
overlookmotel 603b904d72 perf(packages/codegen): check sourceText only once (#25887)
Follow-on after #25585. Small optimization.

Sourcemaps can't be generated unless `options.sourceText` is provided. This is already checked at the start. So everywhere else can then rely on `state.sourceText != null`, rather than re-checking it on each write.
2026-08-19 08:12:02 +00:00
Connor Shea 24d1a0439b chore(linter): Mark vue/prefer-single-event-payload as unsupported. (#25898)
It requires template parsing.
https://eslint.vuejs.org/rules/prefer-single-event-payload.html
2026-08-19 09:06:14 +01:00
Connor Shea 51d36d7228 fix(linter/vue): resolve vue imports via shared import helpers (#25903)
AI Disclosure: Generated with Claude Code, Opus 5. Tested and reviewed
by me.

Why do many code when few do trick?

Follow-up to #25901. Hand-rolled import checks can simply be replaced
with the shared `is_import_symbol` helper, this also helps improve the
accuracy of the code to catch aliased imports for one of them.

### Bug fixed

`is_vue_define_component_reference` (used by
`vue/no-deprecated-delete-set` to decide whether a `this.$set` /
`this.$delete` call sits inside a Vue component) gated on the **local**
name being `defineComponent` before walking up to the
`ImportDeclaration`, so an aliased import was never recognised:

```vue
<script>
import { defineComponent as dc } from 'vue'
dc({
  mounted () {
    this.$set(obj, key, value)
    this.$delete(obj, key)
  }
})
</script>
```

Neither call was reported before; both are now. Covered by a new test
case.

### Pure simplifications

- `is_imported_set_or_del_from_vue` (`no-deprecated-delete-set`) — 20
lines → two `is_import_symbol` calls.
- `is_vue_next_tick_import` (`utils/vue.rs`, used by
`vue/next-tick-style` and `vue/valid-next-tick`) — 18 lines → one call.

Both already matched by symbol id, so behavior is unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 09:05:56 +01:00
Connor Shea 83a68d2296 fix(linter/react/no-react-children): resolve react imports by symbol (#25901)
AI Disclosure: Generated with Claude Code, Opus 5. Tested and reviewed
by me.

`no-react-children` decided whether an identifier came from `react` with
a hand-rolled helper that matched by **name**:

```rust
fn is_imported_from_react(local_name: &str, ctx: &LintContext) -> bool {
    ctx.module_record().import_entries.iter().any(|entry| {
        entry.module_request.name() == "react" && entry.local_name.name() == local_name
    })
}
```

This replaces it with the existing shared helpers, `is_import_symbol`
and `is_import_from_module`.

### Bugs fixed

Four false positives, where a local binding shadowed the import:

```js
import { Children } from 'react';
function f(x) { const Children = { count: () => 0 }; return Children.count(x); }

import React from 'react';
function f(x) { const React = { Children: { map: () => {} } }; return React.Children.map(x); }

import { Children } from 'react';
export function f(Children) { return Children.count(1); }

import { count as Children } from 'react'; Children.toArray(x)
```

One false negative, an aliased import the local-name check couldn't see:

```js
import { Children as C } from 'react'; C.toArray(x)
```

All five are covered by new test cases.

### Performance

This has a minor downside in perf, but it's significantly less than a
millisecond difference and is probably worth the downside. We had
originally decided not to care about aliases when implementing this
rule, but this change allows us to reuse the existing util code for
checking where the import comes from, and fixes the aforementioned edge
cases, so I think this is a worthwhile change.

Measured with two `--features allocator` builds, paired and interleaved,
using `--debug=timings --threads=1` to isolate the rule's own time from
parse/semantic noise.

| corpus | base | new | change |
| --- | --- | --- | --- |
| sentry | 4.416ms | 4.589ms | +3.9% slower |
| material-ui | 3.111ms | 3.217ms | +3.4% slower |
| bluesky | 0.503ms | 0.540ms | +7.2% slower |
| actualbudget | 2.012ms | 2.105ms | +4.6% slower |
| synthetic, `Children` used heavily | 19.112ms | 15.443ms | 19.2%
faster |

There is a small, consistent regression on real code, and it's
deliberate. Dropping the `ident.name == "Children"` gate means every
`obj.method()` call in a file importing `react` now does two array
lookups instead of one string compare; removing the `O(imports)` scan
only pays off where `Children` is actually used, which is 27 files out
of 8.8K in sentry. The absolute cost is ≤0.17ms, and `no-react-children`
isn't a default rule anyway.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-19 08:05:03 +00:00
Connor Shea 124e196551 fix(linter): resolve globals by reference, not by name (#25905)
AI Disclosure: Generated with Claude Code, Opus 5. Tested and reviewed
by me.

Ten call sites across nine rules checked whether an identifier is a
specific global with:

```rust
ctx.scoping().root_unresolved_references().contains_key(&ident.name)
```

That asks whether the **name** is unresolved **somewhere in the file**,
not whether **this reference** is global. Any file that shadows the
global in one scope and uses the real global in another gets a false
positive on the shadowed use:

```js
function f(myLogger) {
  const console = myLogger;
  console.log(1);        // reported by `no-console` — this is the bug
}
console.log(2);          // the real global, elsewhere in the file
```

`ctx.is_reference_to_global_variable(ident)` already exists for this and
is used at ~50 other call sites. It is `reference.symbol_id().is_none()`
— one field read instead of hashing the name into the
unresolved-references map — and it honours the user's `globals: { X:
"off" }` config.

### Rules fixed

| rule | shadowed code that was wrongly reported |
| --- | --- |
| `eslint/no-console` | `const console = myLogger; console.log(foo)` |
| `eslint/no-constant-binary-expression` | `const String = MyString;
String(x) ?? y` |
| `eslint/no-new-native-nonconstructor` | `const Symbol = FakeSymbol;
new Symbol()` |
| `eslint/prefer-object-spread` | `const Object = MyObject;
Object.assign({}, a)` |
| `eslint/symbol-description` | `const Symbol = FakeSymbol; Symbol()` |
| `eslint/valid-typeof` | `const undefined = u; typeof x === undefined`
|
| `promise/avoid-new` | `const Promise = FakePromise; new Promise(fn)` |
| `unicorn/new-for-builtins` | `const String = MyString; new
String('x')` |
| `unicorn/prefer-global-this` | `const window = fake; window.foo` |

Each rule gets a pass test in that shape. Both halves matter — without a
second, genuine use of the global the name lookup already returns false,
so a single-scope test would pass before the fix too.

Three of these ship a fix or suggestion (`prefer-global-this`,
`valid-typeof`, `no-console`), so the false positive was rewriting or
deleting code the user owns.

### Real-world impact

Base vs. branch over four corpora (vscode, sentry, material-ui, actual),
each rule isolated with `-A all -A nursery -D <rule> --format=json
--no-ignore --disable-nested-config`, diagnostics normalised to `(file,
span, code, message)`:

**0 added, 23 removed.** Every removal is `prefer-global-this` on a
genuinely shadowed `window`:

- `vscode/src/vs/base/browser/dompurify/dompurify.js` (16) — `let window
= arguments.length > 0 ? arguments[0] : getGlobal()`
- `material-ui/packages-internal/core-docs/src/Demo/DemoSandbox.tsx` (5)
— `function IsolatedDemo({ children, cssVarPrefix, colorSchemeNode,
window })`, a destructured prop
- `sentry/src/sentry/templates/sentry/error-page-embed.js` (2) —
`(function (window, document, JSON) { ... })(window, document, JSON)`,
the classic IIFE parameter

In each file the real global references outside the shadowing scope are
still reported.

### Notes

- `no-console` uses `ident.is_global_reference(ctx.scoping())` rather
than the context helper. An existing fail case pins that `globals: {
console: "off" }` must still report, and the context helper treats
`"off"` as "not a global". The other eight sites use the context helper,
so they now respect that config, but this one doesn't.
- Five upstream ESLint pass cases that were commented out in
`no-constant-binary-expression` now pass and are re-enabled (`function
Boolean(n) { return n; }; Boolean(x) ?? foo` and friends). Two others in
that list stay commented — they are `function foo(undefined) { ... }`,
which is a separate problem: the rule matches `undefined` by name via
`Expression::is_undefined()`. Left a TODO pointing at it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Cameron <cameron.clark@hey.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-19 08:03:44 +00:00
Dunqing 134fb2228d fix(isolated-declarations): preserve unresolved parameter types (#25909)
#25292 made isolated declaration emit report a false TS9025 for a defaulted parameter whose annotation is an indexed access type. This breaks Vite's `UserConfig["base"]` case when Rolldown upgrades Oxc, even though the indexed property already includes `undefined`.

Oxc's isolated declaration emitter has no type checker, so it cannot safely resolve indexed accesses, type references, conditional types, or similar annotations. This change uses a syntax-only classification: widen or diagnose types whose syntax is conclusive, and preserve checker-dependent types rather than emit an unstable error. The union/intersection rules retain the distinct behavior of `any`, `never`, `unknown`, and `void`, and an explicit `undefined` union member is never duplicated.

Regression coverage includes the Rolldown/Vite case and a compact matrix of the relevant type algebra. The implementation and tests were reduced to one commit after review.

Validated with the isolated-declarations tests, strict Clippy, the all-features workspace suite, lint, docs, AST generation, and TypeScript 5.6.1-rc/6.0.3 type-algebra checks. The full local `just ready` run stopped only at a runner-dependent source-map snapshot because the repository expects Node 26.5.0 and this machine has 25.8.1; the remaining suite passed with that and the known terminal-color snapshot group skipped.

Follow-up to #25292. Related Rolldown failure: https://github.com/rolldown/rolldown/actions/runs/32158377691/job/95782148042?pr=10707

Disclosure: this change was prepared and verified with AI assistance (Codex).
2026-08-19 07:36:24 +00:00
Armano 83cb5163c0 feat(minifier): improve negation of expressions in boolean context (#25755)
add `boolean_context` to `minimize_not` so negation folding can happen
in-place when possible, reducing extra AST rebuilds and allocations and
`!0` / `!1` can now collapse directly to `1` / `0` in boolean context
2026-08-19 13:21:35 +08:00
connorshea 9b7e15362d docs(linter): set version to 1.79.0 for rules shipped in 1.79.0 (#25902)
The 22 React Compiler rules split out by #25500, plus `eslint/no-unreachable-loop`, all first shipped in oxlint 1.79.0 but were still marked `version = "next"`. I think the release PR must've failed to run this part of the release task?

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-08-19 02:52:17 +00:00
Boshen a701bccac9 fix(linter): remove invalid React compiler doc links (#25900)
The shared React Compiler rule macro generated `react.dev` links for internal categories without public lint pages. Render those attributions without links and verify linked versus unlinked rule documentation.

Validated with `just ready`.

AI-assisted.
2026-08-19 02:19:06 +00:00
Armano 5ef0c93295 perf(minifier): unwrap all unary exprs without creating dummy expressions (#25891)
This is a follow up for changes introduced in #25836 by applying
`replace_expression_with` helper to unused expressions and to substitute
2026-08-19 10:04:50 +08:00
overlookmotel 8783524015 perf(packages/codegen): remove loop from growMappingBuffer (#25886)
Follow-on after #25585. Small optimization.

Simplify `growMappingBuffer` by relying on existing invariants. Buffer always has at least 64 bytes capacity, and no caller needs to reserve more than 64 bytes. So doubling capacity is always sufficient.

Add a debug assert to ensure this invariant continues to hold.
2026-08-18 17:25:19 +00:00
overlookmotel b6b14c0629 perf(packages/codegen): remove redundant branch (#25885)
Follow-on after #25585. Small optimization.

The function exits early if `sourceText === undefined`, so no need to check this again later.
2026-08-18 17:25:18 +00:00
overlookmotel be6adf0d51 perf(packages/sourcemap): make location passed to recordSourceMapping always a number (#25884)
Follow-on after #25585. Small optimization.

`location` passed to `recordSourceMapping` was either `false` or a small number. Swap `false` for `0`, so its always passed a number (SMI), removing the need for type-checks.
2026-08-18 17:17:25 +00:00
overlookmotel f720f15b62 perf(packages/codegen): take named-mapping only code off hot path in recordSourceMapping (#25883)
Follow-on after #25585. Small optimization.

`name` can only be `!== undefined` when `location === false`. So move that logic into that block, removing a branch from the fast path.
2026-08-18 16:54:40 +00:00
overlookmotel a734af5347 perf(packages/codegen): remove redundant setting of last in printImportAttributes and printIf (#25882)
Follow-on after #25585. Small optimization.

No point setting `last` here, since in both cases its immediately overwritten before anything else can read it.
2026-08-18 16:54:40 +00:00
overlookmotel c6e44c6e80 perf(packages/codegen): combine 2 writes in printJSXElement (#25881)
Follow-on after #25585. Small optimization.

These 2 write calls can be combined into 1 without any behavior difference.
2026-08-18 16:54:39 +00:00
camc314 28c6aa63db test(codegen): cover standalone statement printing (#25890)
## Summary

Add direct public-API tests for `printSync(statement)`:

- JavaScript/TypeScript statement output
- source-map metadata for a JavaScript statement
2026-08-18 16:47:29 +00:00
camc314 526c2b3fc4 fix(codegen): remove deprecated test APIs (#25889)
## Summary
- replace deprecated Vitest `toThrowError` assertions with `toThrow`
- enable `typescript/no-deprecated` for `packages/codegen`
2026-08-18 16:41:35 +00:00
overlookmotel 880166249c perf(packages/codegen): remove redundant mapping from printParams (#25880)
Follow-on after #25585. Small optimization.

It's redundant to call `markWithMapNoName` with `decorators[0]` as `printDecorators` marks the same mapping immediately after.
2026-08-18 16:34:35 +00:00
camc314 eff863b1c8 test(codegen): add source-level coverage (#25879)
## Summary

- add a recursive local fixture runner with consolidated JS, JSX, TS, and TSX coverage cases to address missing test coverage
2026-08-18 16:24:51 +00:00
overlookmotel ea2880170a test(package/codegen): add benchmark with sourcemaps (#25772)
Add benchmarks for source maps in `oxc-codegen`.

2 benchmarks:

1. Full end-to-end.
2. Without the actual sourcemap generation at the end.

The 2nd is to measure the overhead that pushing to the sourcemap arrays adds while printing in isolation.
2026-08-18 16:17:46 +00:00
renovate[bot] 82ebb48d68 chore(deps): update oxc to ^0.145.0 (#25878)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [@oxc-project/types](https://oxc.rs)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types))
| [`^0.144.0` →
`^0.145.0`](https://renovatebot.com/diffs/npm/@oxc-project%2ftypes/0.144.0/0.145.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@oxc-project%2ftypes/0.145.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@oxc-project%2ftypes/0.145.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@oxc-project%2ftypes/0.144.0/0.145.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@oxc-project%2ftypes/0.144.0/0.145.0?slim=true)
|
| [oxc-parser](https://oxc.rs/docs/guide/usage/parser)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/napi/parser))
| [`^0.144.0` →
`^0.145.0`](https://renovatebot.com/diffs/npm/oxc-parser/0.144.0/0.145.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/oxc-parser/0.145.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxc-parser/0.145.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxc-parser/0.144.0/0.145.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxc-parser/0.144.0/0.145.0?slim=true)
|

---

### Release Notes

<details>
<summary>oxc-project/oxc (@&#8203;oxc-project/types)</summary>

###
[`v0.145.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxc-types/CHANGELOG.md#01450---2026-08-18)

##### 🐛 Bug Fixes

-
[`0c68b7f`](https://redirect.github.com/oxc-project/oxc/commit/0c68b7f)
estree: Emit `decorators` on `FormalParameterRest`
([#&#8203;25582](https://redirect.github.com/oxc-project/oxc/issues/25582))
(camc314)

</details>

<details>
<summary>oxc-project/oxc (oxc-parser)</summary>

###
[`v0.145.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/napi/parser/CHANGELOG.md#01450---2026-08-18)

##### 🐛 Bug Fixes

-
[`db44651`](https://redirect.github.com/oxc-project/oxc/commit/db44651)
napi: Disable reuseWorker in browser bindings
([#&#8203;25640](https://redirect.github.com/oxc-project/oxc/issues/25640))
(leaysgur)
-
[`0c68b7f`](https://redirect.github.com/oxc-project/oxc/commit/0c68b7f)
estree: Emit `decorators` on `FormalParameterRest`
([#&#8203;25582](https://redirect.github.com/oxc-project/oxc/issues/25582))
(camc314)

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Shanghai)

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

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

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

---

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

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zMi42IiwidXBkYXRlZEluVmVyIjoiNDQuMzIuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-18 16:11:53 +00:00
renovate[bot] 6f47f6f4ed chore(deps): update dependency oxlint to v1.79.0 (#25873)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs/docs/guide/usage/linter)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint))
| [`1.78.0` →
`1.79.0`](https://renovatebot.com/diffs/npm/oxlint/1.78.0/1.79.0) |
![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/1.79.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/1.79.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/1.78.0/1.79.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/1.78.0/1.79.0?slim=true)
|

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

###
[`v1.79.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxlint/CHANGELOG.md#1790---2026-08-18)

##### 💥 BREAKING CHANGES

-
[`8c4552d`](https://redirect.github.com/oxc-project/oxc/commit/8c4552d)
linter: \[**BREAKING**] Split react/react-compiler into per-category
rules
([#&#8203;25500](https://redirect.github.com/oxc-project/oxc/issues/25500))
(Boshen)

##### 🐛 Bug Fixes

-
[`228e8e0`](https://redirect.github.com/oxc-project/oxc/commit/228e8e0)
linter: Resolve inactive React compiler rules
([#&#8203;25830](https://redirect.github.com/oxc-project/oxc/issues/25830))
(Boshen)
-
[`aa49d86`](https://redirect.github.com/oxc-project/oxc/commit/aa49d86)
linter: Allow spread rule options in config types
([#&#8203;25675](https://redirect.github.com/oxc-project/oxc/issues/25675))
(ch3rry)
-
[`36f8451`](https://redirect.github.com/oxc-project/oxc/commit/36f8451)
linter/eslint/no-eval: Align indirect default with ESLint
([#&#8203;25656](https://redirect.github.com/oxc-project/oxc/issues/25656))
(camc314)
-
[`beb724d`](https://redirect.github.com/oxc-project/oxc/commit/beb724d)
linter/eslint/no-unused-vars: Report bare underscore parameters
([#&#8203;25663](https://redirect.github.com/oxc-project/oxc/issues/25663))
(camc314)
-
[`4004c10`](https://redirect.github.com/oxc-project/oxc/commit/4004c10)
linter/eslint/no-irregular-whitespace: Check comments by default
([#&#8203;25660](https://redirect.github.com/oxc-project/oxc/issues/25660))
(camc314)
-
[`285820e`](https://redirect.github.com/oxc-project/oxc/commit/285820e)
linter/no-large-snapshots: Precompile and document allowed snapshot
matchers
([#&#8203;25611](https://redirect.github.com/oxc-project/oxc/issues/25611))
(Mikhail Baev)
-
[`4df5835`](https://redirect.github.com/oxc-project/oxc/commit/4df5835)
linter: Allow capitalized built-in calls
([#&#8203;25516](https://redirect.github.com/oxc-project/oxc/issues/25516))
(Boshen)

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Shanghai)

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

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, 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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zMi42IiwidXBkYXRlZEluVmVyIjoiNDQuMzIuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-18 16:07:58 +00:00
overlookmotel 5ad330e96d docs(packages/codegen): reformat comments (#25876)
Continuation of #25848. Pure style change. Reformat a couple of comments I missed previously.
2026-08-18 15:56:13 +00:00
renovate[bot] 93bf42d3ec chore(deps): update dependency oxfmt to ^0.64.0 (#25877)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [oxfmt](https://oxc.rs/docs/guide/usage/formatter)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt))
| [`^0.61.0` →
`^0.64.0`](https://renovatebot.com/diffs/npm/oxfmt/0.61.0/0.64.0) |
![age](https://developer.mend.io/api/mc/badges/age/npm/oxfmt/0.64.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxfmt/0.64.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxfmt/0.61.0/0.64.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxfmt/0.61.0/0.64.0?slim=true)
|

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxfmt)</summary>

###
[`v0.64.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxfmt/CHANGELOG.md#0640---2026-08-18)

[Compare
Source](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.63.0...oxfmt_v0.64.0)

##### 🚀 Features

-
[`c07fe7c`](https://redirect.github.com/oxc-project/oxc/commit/c07fe7c)
oxfmt: Support `experimentalOperatorPosition`
([#&#8203;25643](https://redirect.github.com/oxc-project/oxc/issues/25643))
(leaysgur)

##### 📚 Documentation

-
[`fed6681`](https://redirect.github.com/oxc-project/oxc/commit/fed6681)
oxfmt: Skip expanding overrides options
([#&#8203;25572](https://redirect.github.com/oxc-project/oxc/issues/25572))
(leaysgur)

###
[`v0.63.0`](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.62.0...oxfmt_v0.63.0)

[Compare
Source](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.62.0...oxfmt_v0.63.0)

###
[`v0.62.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxfmt/CHANGELOG.md#0620---2026-08-03)

[Compare
Source](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.61.0...oxfmt_v0.62.0)

##### 🐛 Bug Fixes

-
[`e6e584b`](https://redirect.github.com/oxc-project/oxc/commit/e6e584b)
oxfmt: Type jsdoc. enum options
([#&#8203;25008](https://redirect.github.com/oxc-project/oxc/issues/25008))
(leaysgur)

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Shanghai)

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

🚦 **Automerge**: Enabled.

♻ **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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zMi42IiwidXBkYXRlZEluVmVyIjoiNDQuMzIuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-18 15:50:26 +00:00
camc314 fc4e18edf9 refactor(codegen): use it.for for generated tests (#25874)
## Summary
- replace manual test-registration loops with Vitest parameterized APIs
- preserve per-fixture skip behavior with `.for` and parameterized suite options
- retain imperative loops that exercise fixture contents rather than register tests
2026-08-18 15:38:24 +00:00
camc314 344a9b23c6 fix(codegen): align enum template sourcemaps (#25872)
## Summary
- align computed template enum member source-map positions with Rust `oxc_codegen`
- tests coming in a followup PR
2026-08-18 15:11:22 +00:00
camc314 db64852c4f refactor(codegen): remove legacy module declaration support (#25864)
## Summary
- remove the legacy TSModuleDeclaration kind fallback
- require Oxc's explicit kind AST shape
- remove the completed compatibility documentation section
2026-08-18 14:36:30 +00:00
camc314 56a01b59c5 refactor(codegen): remove legacy enum declaration support (#25863)
## Summary
- remove the legacy TSEnumDeclaration members fallback
- require Oxc's enum body AST shape
- update compatibility documentation
2026-08-18 14:28:13 +00:00
oxc-guard[bot] 0db127cc16 release(apps): oxlint v1.79.0 && oxfmt v0.64.0 (#25866)
# Oxlint
### 💥 BREAKING CHANGES

- 8c4552d linter: [**BREAKING**] Split react/react-compiler into
per-category rules (#25500) (Boshen)

### 🚀 Features

- 9b7394e linter/typescript/no-empty-object-type: Implement suggestion
(#25833) (Mikhail Baev)

### 🐛 Bug Fixes

- 345f981 react_compiler: Skip node_modules by default (#25859) (Boshen)
- 2f40afa linter/unicorn/no-array-callback-reference: Ignore effect
library imports (#25857) (Michaël Bitard)
- 7b565a0 linter: Align React Compiler rule categories (#25840) (Boshen)
- 228e8e0 linter: Resolve inactive React compiler rules (#25830)
(Boshen)
- f8e4884 linter/eslint/no-useless-constructor: Allow parameter
properties (#25811) (camc314)
- e4b6993 linter: Report exhaustive effect dependencies (#25829)
(Boshen)
- 742e25f linter/eslint/no-return-assign: Anchor diagnostic on return
stmt (#25803) (camc314)
- b831ca8 react-compiler: Improve derived state diagnostic (#25804)
(Boshen)
- 5908c87 linter/jest/prefer-mock-return-shorthand: Preserve
implementations using this (#25802) (camc314)
- f6b2265 linter/eslint/no-redeclare: Run in ES modules, skipping only
the globals check (#25691) (Hamody We)
- ca9f553 linter/unicorn/prefer-default-parameters: Mark fixer as a
suggestion (#25801) (camc314)
- aa49d86 linter: Allow spread rule options in config types (#25675)
(ch3rry)
- d5483f8 linter/typescript/no-useless-empty-export: Skip TS declaration
files (#25789) (Evyatar Daud)
- 57f2199 linter/typescript/no-useless-empty-export: Report after
imports (#25786) (camc314)
- 633bc19 linter/typescript/no-unnecessary-type-conversion: Mark fixer
as `suggestion` (#25787) (camc314)
- dea3339 linter/typescript/explicit-module-boundary-types: Anchor
diagnostics on arrows (#25779) (camc314)
- 5cd6f02 linter/eslint/array-callback-return: Anchor diagnostic on
callback (#25780) (camc314)
- ef8cebf linter/eslint/preserve-caught-error: Handle AggregateError
options (#25775) (camc314)
- c108d5c linter: Improve React Compiler diagnostics (#25742) (Boshen)
- c9ec55e react-compiler: Improve diagnostic spans (#25731) (Boshen)
- 1cbbcb7 linter/unicorn/prefer-string-replace-all: Apply fixes in one
pass (#25709) (Mikhail Baev)
- dec0a86 react-compiler: Standardize diagnostics (#25702) (Boshen)
- 5fd77f7 linter/react/display-name: Report curried HOC inner component
(#25662) (camc314)
- 4dbb80e linter/import/no-named-as-default: Report local export
conflicts (#25658) (camc314)
- e8a7214 linter/react/rules-of-hooks: Report hooks inside try blocks
(#25670) (camc314)
- 36f8451 linter/eslint/no-eval: Align indirect default with ESLint
(#25656) (camc314)
- d901d24 linter/react/exhaustive-deps: Handle destructured object
dependencies (#25669) (camc314)
- beb724d linter/eslint/no-unused-vars: Report bare underscore
parameters (#25663) (camc314)
- fa36f26 linter/react/no-this-in-sfc: Detect this in nested arrow
callbacks (#25653) (camc314)
- 44d1be3 linter/typescript/no-var-requires: Run rule on JavaScript
(#25664) (camc314)
- 4004c10 linter/eslint/no-irregular-whitespace: Check comments by
default (#25660) (camc314)
- 625401d linter/import/no-named-default: Flag type-only named defaults
(#25661) (camc314)
- 8eacb2d linter/typescript/no-non-null-asserted-optional-chain: Detect
assertions after continued optional chains (#25659) (camc314)
- d55b76c linter/react/no-direct-mutation-state: Detect computed state
mutations (#25654) (camc314)
- f92c651 linter/unicorn/no-abusive-eslint-disable: Use directive prefix
in diagnostic (#25657) (camc314)
- ee44996 linter/eslint/max-classes-per-file: Anchor diagnostic at
program start (#25652) (camc314)
- 403ec40 linter/eslint/no-multi-assign: Handle parenthesized declarator
initializers (#25651) (camc314)
- 6c9ba37 linter/jest/expect-expect: Detect assertions in nested
function declarations (#25650) (camc314)
- 285820e linter/no-large-snapshots: Precompile and document allowed
snapshot matchers (#25611) (Mikhail Baev)
- 1be1e20 linter/eslint/prefer-promise-reject-errors: Report on spread
arguments (#25648) (Mikhail Baev)
- a38f7b3 oxlint,oxfmt: Apply .gitignore only to walk targets, not
explicitly named files (#25531) (leaysgur)
- 509931b semantic: Classify global references per identifier (#25608)
(camc314)
- 0c68b7f estree: Emit `decorators` on `FormalParameterRest` (#25582)
(camc314)
- 1d22912 linter/plugins: Parse rule-less directive justifications
(#25559) (camc314)
- eaf80d8 linter/unicorn/prefer-node-protocol: Validate exact Node.js
built-in specifiers (#25558) (camc314)
- 57b94af linter/promise/no-multiple-resolved: Ignore unresolved globals
(#25530) (Tushar Singh)
- 80e64c2 linter/expect-expect: Validate assertion regex (#25504)
(Mikhail Baev)
- 7830604 linter/react/exhaustive-deps: Treat binary expressions as a
stable dependency (#25508) (Hamody We)
- 4df5835 linter: Allow capitalized built-in calls (#25516) (Boshen)
- 9d49d27 react_compiler: Bail out instead of panicking on "Expected a
node for all scopes" (#25506) (Boshen)
- d43b562 linter/vitest/prefer-expect-assertions: Handle parameterized
Vitest assertion suggestions (#25476) (camc314)

### ⚡ Performance

- e8303d6 linter: Shrink rule serialization dispatch (#25818) (Boshen)
- c84ede3 estree_tokens: Share JS token update entry point (#25826)
(Boshen)
- 35c8eb2 linter: Compute sort keys once with sort_by_cached_key
(#25821) (Boshen)
- f0121ed linter: Share config deserialization entry point (#25820)
(Boshen)
- 2dacf7a oxlint: Reduce debug formatting code size (#25797) (Boshen)
- 9ed10b7 linter: Use unstable sorts for unique keys (#25778) (Boshen)
- 63ff8ef linter: Outline diagnostic construction (#25762) (Boshen)
- 2dd7446 diagnostics: Preallocate graphical output (#25721) (Boshen)
- 9c8abab diagnostics: Batch graphical reports (#25710) (Boshen)
- 8e9b95f linter: Use table for rule names (#25458) (Boshen)
# Oxfmt
### 🚀 Features

- c07fe7c oxfmt: Support `experimentalOperatorPosition` (#25643)
(leaysgur)
- 2adb8fb formatter: Implement `operatorPosition` option (#25581)
(leaysgur)

### 🐛 Bug Fixes

- 44231fb formatter: Fix comment and indent issues around unions
(#25665) (leaysgur)
- 2465e87 formatter: Keep comments in place when dropping
`EmptyStatement` (#25730) (leaysgur)
- 7e4f3b7 formatter: Print `JSDocUnknownType` (#25729) (leaysgur)
- 5238d9e formatter: Keep nested awaited-paren member chain grouped in
call arguments (#25646) (leaysgur)
- a38f7b3 oxlint,oxfmt: Apply .gitignore only to walk targets, not
explicitly named files (#25531) (leaysgur)
- 5c0a5ff formatter_css: Fill own-line block comments inside
space-separated values (#25578) (leaysgur)
- 53debfa formatter_css: Keep trailing comma and indent after
comment-preceded last map value (#25577) (leaysgur)
- 1a83a8d oxfmt: Mirror printer line suppression and restore
dedent-to-root (#25573) (leaysgur)
- 7f350d1 formatter: Keep unary comment and print only needed parens
(#25526) (leaysgur)
- f405789 formatter_yaml: Consistent chomped eos behavior (#25523)
(leaysgur)
- a243311 formatter_yaml: Bump oxc-yaml-parser for contentless block
scalar (#25519) (leaysgur)
- 40d38a0 formatter_css: Keep multi value function args intact after
leading comment (#25518) (leaysgur)

### 📚 Documentation

- 223e785 oxfmt/conformance: Update notes on conformance (#25757) (Yuji
Sugiura)
- 673dc6d oxfmt: Move some docs from AGENTS.md to code comment (#25649)
(leaysgur)
- fed6681 oxfmt: Skip expanding overrides options (#25572) (leaysgur)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
oxfmt_v0.64.0 apps_v1.79.0 oxlint_v1.79.0
2026-08-18 22:27:08 +08:00
oxc-guard[bot] 4a4a1fb2e7 release(crates): oxc v0.145.0 (#25865)
### 💥 BREAKING CHANGES

- 365274e packages/codegen: [**BREAKING**] `printSync` return an object
(#25720) (overlookmotel)

### 🚀 Features

- 6a7eb60 packages/codegen: Alter capitalization of `sourceFilename`
option (#25854) (overlookmotel)
- 300763f packages/codegen: Add full source map support (#25585)
(camc314)
- a169e4a napi/minify: Expose property name mangling options (#24741)
(Dunqing)
- 2f5cdb1 minifier: Add property name mangling (#24740) (Dunqing)
- 4922141 mangler: Deduplicate private accessor names (#25601) (camc314)
- 1c4f519 napi: Add Relay transform plugin (#25503) (Boshen)
- a4478e9 codegen: Add `oxc-codegen` package (#25488) (overlookmotel)

### 🐛 Bug Fixes

- 0fbcf64 codegen: Validate sourcemap options (#25860) (camc314)
- 345f981 react_compiler: Skip node_modules by default (#25859) (Boshen)
- ab81f3f minifier: Drop side-effect-free additions (#25639) (Dunqing)
- 241c559 napi/minify: Accept RegExp for property filters (#25827)
(Dunqing)
- 4cc7ea4 codegen: Reject invalid indent options (#25807) (camc314)
- 53f9295 isolated-declarations: Preserve undefined for defaulted any
(#25292) (camc314)
- 8ab883a codegen: Preserve property key annotations (#25766) (Dunqing)
- b13fd48 minifier: Model uninitialized module vars as undefined
(#25497) (Dunqing)
- f6000ac ecmascript: Fold `**` with `Number::exponentiate`, not IEEE
`pow` (#25644) (Kotaro Chikuba)
- b846abc isolated-declarations: Handle ambient expando properties
(#25655) (camc314)
- dec0a86 react-compiler: Standardize diagnostics (#25702) (Boshen)
- fca2e0c parser: Reject initialized lexical declarations in for-in
(#25700) (Boshen)
- ae9be8f parser: Forbid type parameters on quoted constructors (#25696)
(Boshen)
- c5f188a react-compiler: Use Babel v1 validation defaults (#25676)
(Boshen)
- db44651 napi: Disable reuseWorker in browser bindings (#25640)
(leaysgur)
- ce35d47 react_compiler: Preserve JSX import source pragmas (#25592)
(Boshen)
- 059784d semantic: Respect shadowed `Infinity` and `NaN` in enum
evaluation (#25604) (camc314)
- bb5a232 minifier: Keep variable declaration initilized with class when
keepNames is enabled (#25584) (sapphi-red)
- f49229d minifier: Keep side effects when rotating bitwise operands
(#25596) (Kotaro Chikuba)
- e82495b ecmascript: Derive `ToNumber` of `!x` from `ToBoolean`
(#25595) (Kotaro Chikuba)
- 509931b semantic: Classify global references per identifier (#25608)
(camc314)
- 80484ce mangler: Correct base54 safety comment (#25606) (camc314)
- c1369a7 codegen: Resolve private names in class heritage (#25588)
(camc314)
- c002f29 codegen: Escape sources for empty import specifiers (#25586)
(camc314)
- 0c68b7f estree: Emit `decorators` on `FormalParameterRest` (#25582)
(camc314)
- cdf1846 semantic: Allow legacy escapes in JSX attributes (#25576)
(Boshen)
- e75e102 minifier: Preserve block statement in labeled iteration
statements (#25162) (Armano)
- 771d79a mangler: Exclude non-manglable symbols from slot assignment
(#25539) (sapphi-red)
- 76b19f5 minifier: Avoid duplicating large folded strings (#25532)
(Dunqing)
- 59e8895 codegen: Validate starting indent level (#25550) (camc314)
- 88b34f2 clippy: Remove unneeded `unsafe` (#25551) (camc314)
- 23a7ad0 parser: Stop delimited lists at end of file (#25542) (Boshen)
- 73acba9 parser: Preserve fatal errors during await reparse (#25541)
(Boshen)
- c3e99d1 minifier: Avoid invalid octal escapes in template folds
(#25495) (Dunqing)
- b4e6a9e codegen: Output newline after `export default interface`
(#25487) (overlookmotel)
- 5fcf683 minifier: Correct issue with try finally termination (#25185)
(Armano)
- 1645d93 react_compiler: Preserve source spans (#25462) (Boshen)
- 8d7f9cf react_compiler: Honor eslint suppressions (#25394) (Boshen)

### ⚡ Performance

- 568203e ecmascript: Use binary search for known globals (#25817)
(Boshen)
- c84ede3 estree_tokens: Share JS token update entry point (#25826)
(Boshen)
- 9a6e862 minifier: Move owned statements directly (#25835) (Dunqing)
- 61b2aef minifier: Move owned AST nodes directly (#25837) (Dunqing)
- 673b04b minifier: Replace expressions without take_in dummies (#25836)
(Dunqing)
- 63ff8ef linter: Outline diagnostic construction (#25762) (Boshen)
- 621808e diagnostics: Measure graphemes lazily (#25723) (Boshen)
- f62ed0e diagnostics: Optimize graphical number rendering (#25715)
(Boshen)
- 7152834 diagnostics: Reduce graphical formatting overhead (#25714)
(Boshen)
- 10fc4b7 diagnostics: Reduce graphical rendering allocations (#25711)
(Boshen)
- 9c8abab diagnostics: Batch graphical reports (#25710) (Boshen)
- 757f3d4 mangler: Share allocated names across reused slots (#25605)
(camc314)
- 5444cbf codegen: Skip escaping harmless `<` tokens (#25564) (camc314)

### 📚 Documentation

- 58f7ab9 packages/codegen: Reformat docs and comments (#25848)
(overlookmotel)
- 627466e transform-react: Document all options (#25800) (Boshen)
- ce03ac1 packages/codegen: Fix JSDoc comments for `printSync` (#25722)
(overlookmotel)
- 386a699 packages/codegen: Correct JSDoc comment (#25716)
(overlookmotel)
- 31e571d mangler: Update code example (#25599) (camc314)
- fd62354 codegen: Revamp package readme (#25560) (camc314)
- ffa3153 codegen: Clarify raw transfer Node requirement (#25565)
(camc314)
- c5d4063 codegen: Clarify binary walk allocations (#25562) (camc314)
- 5703d7a codegen: Correct stale printer comments (#25561) (camc314)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
crates_v0.145.0
2026-08-18 22:26:40 +08:00
camc314 90098e65b3 refactor(codegen): remove legacy import type support (#25862)
## Summary
- remove the legacy TSImportType argument fallback
- require Oxc's source AST shape
- update compatibility documentation
2026-08-18 14:18:15 +00:00
camc314 b564ec82f4 refactor(codegen): remove legacy mapped type support (#25861)
## Summary
- remove the pre-v6 TS-ESLint TSMappedType.typeParameter fallback
- require Oxc's key / constraint mapped-type AST shape
- update compatibility documentation
2026-08-18 14:07:15 +00:00
camc314 0fbcf6420b fix(codegen): validate sourcemap options (#25860)
## Summary
- require a string sourceText when sourcemaps are enabled
- reject non-string supplied sourceFilename values before map generation
- cover invalid and valid source-map option combinations
2026-08-18 13:57:46 +00:00
Boshen 345f9818c5 fix(react_compiler): skip node_modules by default (#25859)
## Summary
- skip React Compiler transform and lint analysis for `node_modules` by default
- let explicit transform `sources` allowlists opt dependencies back in
- document the behavior and add regression coverage

## Validation
- focused Oxlint and transform-react checks
- Clippy with warnings denied
- `just ready` reached the all-features suite; three Oxlint ANSI-color snapshots differed in this environment

AI assistance: Codex was used to implement and verify this change.
2026-08-18 13:50:31 +00:00
Michaël Bitard 2f40afa45b fix(linter/unicorn/no-array-callback-reference): ignore effect library imports (#25857)
Fix #25856

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-18 14:49:54 +01:00
camc314 3bf05309dd ci(labeler): label codegen package PRs (#25784)
## Summary

- automatically apply A-codegen to changes under packages/codegen
- keep the Rust and TypeScript code generators in the same functional area

## Naming

Reuse A-codegen because recent packages/codegen PRs already receive it manually. A-printer is stale, while names such as A-codegen-js or P-codegen would introduce a distinction or label prefix the repository does not currently use.
2026-08-18 13:25:19 +00:00
overlookmotel 6a7eb602ed feat(packages/codegen): alter capitalization of sourceFilename option (#25854)
Follow-on after [#25585](/github/pr-or-issue/oxc-project/oxc/25585).

Rename `options.sourceFileName` to `sourceFilename`. We use both capitalizations internal Rust code, but always `filename` in external JS APIs (Oxlint plugins etc).

NOTE: this is not marked as a breaking change as it was merged before the feature was released.
2026-08-18 13:16:15 +00:00
overlookmotel 578a81105d refactor(packages/codegen): printSync return consistent object shape (#25853)
Follow-on after #25585.

Nit. Make `printSync` return an object with consistent shape. With `sourcemap: false` it now returns `{ code: string, map: null }` instead of just `{ code: string }`.

Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-18 13:04:06 +00:00
Boshen 7b565a0344 fix(linter): align React Compiler rule categories (#25840)
Align React Compiler rule categories with the ESLint presets in `babel-plugin-react-compiler@0.0.0-experimental-a1856f3-20260507`. Rules that are off upstream no longer use Oxlint's default correctness category, while `incompatible-library` uses correctness because it is recommended upstream.

| Rule name | ESLint preset | Oxlint category | Note |
| --- | --- | --- | --- |
| `error-boundaries` | `recommended` | `correctness` |  |
| `globals` | `recommended` | `correctness` |  |
| `immutability` | `recommended` | `correctness` |  |
| `incompatible-library` | `recommended` | `correctness` |  |
| `preserve-manual-memoization` | `recommended` | `correctness` |  |
| `purity` | `recommended` | `correctness` |  |
| `refs` | `recommended` | `correctness` |  |
| `set-state-in-effect` | `recommended` | `correctness` |  |
| `set-state-in-render` | `recommended` | `correctness` |  |
| `static-components` | `recommended` | `correctness` |  |
| `use-memo` | `recommended` | `correctness` |  |
| `unsupported-syntax` | `recommended` | `restriction` | Compiler support boundary. |
| `config` | `recommended` | Not implemented | Oxlint uses fixed, valid compiler options. |
| `gating` | `recommended` | Not implemented | Oxlint does not expose compiler gating options. |
| `void-use-memo` | `recommended-latest` | `correctness` | Enabled by the newer upstream preset. |
| `no-deriving-state-in-effects` | `off` | `perf` | Performance and derived-state guidance. |
| `invariant` | `off` | `restriction` | Internal compiler invariant. |
| `rule-suppression` | `off` | `restriction` | Compiler policy restriction. |
| `syntax` | `off` | `restriction` | Compiler syntax restriction. |
| `todo` | `off` | `restriction` | Unimplemented-feature diagnostic; a hint upstream. |
| `capitalized-calls` | `off` | `suspicious` | Kept out of default correctness. |
| `exhaustive-effect-dependencies` | `off` | `suspicious` | Dependency diagnostic, not default correctness. |
| `hooks` | `off` | `suspicious` | Overlaps the non-compiler `rules-of-hooks` rule. |
| `memo-dependencies` | `off` | `suspicious` | Overlaps the non-compiler `exhaustive-deps` rule. |
| `fbt` | `off` | Not implemented | This is a Meta-internal FBT category. |
| `memoized-effect-dependencies` | `off` | Not implemented | Upstream's `EffectDependencies` category is absent from the Rust compiler port. |

Validated with `just ready` and the category integration test after rebasing onto main.

AI-assisted: Codex was used to implement and validate this change.
2026-08-18 12:57:01 +00:00