oxc-project
oxc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
perf(isolated-declarations): replace hash collections with index-based Vec (#19221) ## Summary - Eliminate redundant `transformed_spans: FxHashSet<Span>` by consolidating passthrough cases into `transformed_stmts` - Replace `transformed_stmts: FxHashMap<Span, Statement>` with `Vec<Option<Statement>>` indexed by statement position for O(1) lookups - Merge `get_assignable_properties_for_namespaces` into `report_error_for_expando_function` as a single forward pass **Benchmark (vue-id.ts):** 8.53ms โ 6.57ms (**~23% faster**) ## Test plan - [x] `cargo test -p oxc_isolated_declarations` โ all 20 tests pass - [x] `cargo clippy` โ no warnings - [x] `cargo bench -p oxc_benchmark --bench transformer -- isolated-declarations` ๐ค Generated with [Claude Code](https://claude.com/claude-code)
main
39 minutes ago
semantic: assign ast node ids during semantic build Entire-Checkpoint: a4f3fdbfe5b0
02-11-semantic_assign_ast_node_ids_during_semantic_build_entire-checkpoint_a4f3fdbfe5b0
41 minutes ago
refactor(ast): change `node_id` field to `Cell<NodeId>` with generated getter/setter Allow interior mutability for `node_id` (setting the ID after construction without `&mut`), consistent with how `scope_id`, `symbol_id`, and `reference_id` already use `Cell<Option<T>>`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: ad127ea97f2a
feat/ast-node-id
41 minutes ago
perf(linter/class-literal-property-style): avoid unneeded string allocations (#19262)
main
1 hour ago
fix(linter): recognize module-scoped callback refs as stable in exhaustive-deps (#19220) Fix an `exhaustive-deps` divergence from ESLint's `eslint-plugin-react-hooks`: module-scoped function references passed as callbacks (e.g. `useMemo(getColumns, [])`) are not recognized as stable. --- ### Details Consider this pattern: ```js function getColumns() { return []; } // module scope function MyComponent() { const columns = useMemo(getColumns, []); // oxlint false positive } ``` `getColumns` is defined at module scope โ it never changes between renders. ESLint correctly recognizes this and doesn't report missing dependencies. Oxlint was reporting a false positive. <details> <summary>Why? (explained by Claude Opus 4.6)</summary> When the callback to `useMemo` is an identifier rather than an inline arrow, the rule enters [this branch](https://github.com/oxc-project/oxc/blob/1b2f354/crates/oxc_linter/src/rules/react/exhaustive_deps.rs#L330-L400): 1. It calls `get_declaration_of_variable(ident, ...)` to resolve where `getColumns` is defined โ this finds the declaration **regardless of scope** 2. It sees `AstKind::Function` and wraps it as `CallbackNode::Function`, treating the body as if it were an inline callback 3. It walks the function body with `ExhaustiveDepsVisitor`, collecting all identifier references as "found dependencies" 4. It compares those against the declared `[]` empty array and reports mismatches The problem: between step 1 and 2, there was no check for whether the declaration is even inside the component. The rule already has this exact check for the inline-callback path โ [`is_identifier_a_dependency`](https://github.com/oxc-project/oxc/blob/1b2f354/crates/oxc_linter/src/rules/react/exhaustive_deps.rs#L932-L954) returns `false` when `declaration.scope_id() != component_scope_id`. The function-reference-as-callback path just never had this gate. </details> The fix adds a scope check before analyzing the resolved function body: ```rust if let Some(decl) = get_declaration_of_variable(ident, ctx.semantic()) { // NEW: module-scoped declarations are stable if decl.scope_id() != component_scope_id { return; } // ... existing body analysis logic } ``` Also see: https://github.com/oxc-project/oxc/pull/19254 --------- Co-authored-by: Cameron Clark <cameron.clark@hey.com>
main
1 hour ago
u
sreetamdas:fix/react-hooks-digit-names-and-module-scoped-deps
2 hours ago
fix(linter): detect fallthrough from `default` when it is not the last case (#19261) ## Summary - Fix `no-fallthrough` rule not detecting fallthrough FROM `default` when it is not the last case in a switch statement - The BFS visitor unconditionally stopped at the default case's condition block, preventing exploration of default's body to find fallthrough edges to subsequent cases - Now the visitor continues past default (while still stopping at the switch exit block when no default exists) Closes #11340 ๐ค Generated with [Claude Code](https://claude.com/claude-code)
main
2 hours ago
perf(linter/class-literal-property-style): avoid unneeded string allocations
c/gts
2 hours ago
Active Branches
semantic: assign ast node ids during semantic build Entire-Checkpoint: a4f3fdbfe5b0
last run
41 minutes ago
#19263
CodSpeed Performance Gauge
-6%
feat(ast): add `node_id` field to all AST struct nodes
last run
41 minutes ago
#18138
CodSpeed Performance Gauge
-1%
feat(linter/tsgolint): add support for labeled ranges in tsgolint diagnostics
last run
11 hours ago
#19201
CodSpeed Performance Gauge
0%
ยฉ 2026 CodSpeed Technology
Home
Terms
Privacy
Docs