mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
codex/parser-grouped-expression-allocation
2615 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8694167be7 |
fix(linter/eslint/prefer-destructuring): handle typed declarations (#24616)
## Summary - skip prefer-destructuring diagnostics for variable declarations with type annotations by default - add enforceForDeclarationWithTypeAnnotation for typescript-eslint compatibility - report without an autofix when annotated declarations are explicitly enforced, preserving the declared type - cover object, computed-property, array, renamed-property, and reporter configuration cases This matches the current `@typescript-eslint/prefer-`destructuring behavior. Fixes #24615. |
||
|
|
6fe866af30 |
fix(oxfmt): keep tailwind classes glued to template expr with preserveWhitespace (#24609)
Fixes #24464 When `preserveWhitespace` was enabled, the ignore process was being skipped. |
||
|
|
33e32d8e51 |
fix(formatter_css): use line_suffix for EOL line comment (#24580)
The same motivation as #24579 |
||
|
|
54cc121250 |
feat(ast)!: split MetaProperty into ImportMeta and NewTarget (#24557)
## Summary
- replace the generic Rust MetaProperty AST node with dedicated ImportMeta and NewTarget nodes
- preserve the ESTree MetaProperty shape and generated public TypeScript types
- update parser, formatter, codegen, lint, transform, minifier, traversal, and React compiler consumers
## Summary
Remove `MetaProperty` AST node, in favour of two separate nodes (`ImportMeta` and `NewTarget`)
## Breaking Change
The Rust AST field changes from:
```rust
pub struct MetaProperty<'a> {
pub node_id: Cell<NodeId>,
pub span: Span,
pub meta: IdentifierName<'a>,
pub property: IdentifierName<'a>,
}
```
to:
```rust
/// /// `import.meta` in `console.log(import.meta);`.
pub struct ImportMeta {
pub node_id: Cell<NodeId>,
pub span: Span,
}
/// `new.target` in `function F() { return new.target; }`.
pub struct NewTarget {
pub node_id: Cell<NodeId>,
pub span: Span,
}
```
## Why?
The current AST could represent shapes such as:
```
foo.bar
```
By constructing the node manually. However this doesn't make sense, and is invalid.
## How to migrate?
1. Replace any `Expression::MetaProperty` matches/checks with the dedicated `Expression::ImportMeta` and `Expression::NewTarget` varients
2. Replace any `new_meta_property` construction with the new `new_import_meta` or `new_new_target` APIs.
3. Inspecting the `meta`/`property` identifier names is no longer required.
|
||
|
|
90ae04009e |
perf(linter/reporter/stylish): compute diagnostic Info once per diagnostic (#24525)
AI Disclosure: This was generated with Claude Code, Fable 5. It has been tested and reviewed by me for correctness. `format_stylish` recomputed `Info::new` for every diagnostic in multiple passes — inside `sort_by_key` (which re-evaluates its key on every comparison), then again when grouping by filename, measuring the position column width, and rendering. Each `Info::new` call performs two `read_span` calls, which scan the file's source text from offset 0 to compute line/column, so `--format=stylish` output time grew quadratically with the number of diagnostics in a file. This change computes `Info` once per diagnostic into a `Vec<(Info, &Error)>` and reuses it for sorting, grouping, and rendering. Output is byte-identical (all output-formatter snapshot tests pass unchanged). This does have a downside in that it uses more peak memory in storing the `Info` objects in the Vec. I think the time savings are worth it, and it'd only be a problem for the (less likely) case where there are thousands of diagnostics. Though that's also the case where the optimization is most notable, obviously. ## Benchmark Fixture: a single 1.4MB file with 20k `debugger;` statements interleaved with filler lines (and a 10× smaller variant), release build, macOS. | Command | Before | After | |---|---|---| | `--format=stylish`, 20k diagnostics | 98.5s | 18.9s (5.2× faster) | | `--format=stylish`, 2k diagnostics | 1.09s | 0.22s | | `--format=unix`, 20k diagnostics (unchanged reference) | 20.6s | 20.6s | The fixed `stylish` now matches the streaming `unix` formatter on the same input. The remaining ~19s is a separate, shared issue: `Info::new` scans the source linearly per diagnostic, making every formatter that uses it quadratic in diagnostics-per-file — that would need a fix in `oxc_diagnostics` (e.g. computing positions for all of a file's diagnostics in one scan) and is not addressed here. |
||
|
|
16a65f269c |
feat(linter/react): implement function-component-definition rule (#24471)
## Summary Adds a native Oxlint implementation of the [`eslint-plugin-react` `function-component-definition` rule](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md). This implementation is a port of the [rule source](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/function-component-definition.js), test suite, and autofix logic. Related #1022 ## AI Disclosure GPT 5.6 Sol was used to assist with implementation of this rule. --------- Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
7f1f585b86 |
feat(linter): reuse jest/padding-around-test-blocks for vitest/padding-around-test-blocks (#24519)
this PR moves `jest/padding-around-test-blocks` to the shared jest_vitest rules, so it can be reused by both the jest and vitest rules. issue #4656 --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> |
||
|
|
99978a8bbb |
feat(linter/import/consistent-type-specifier-style): support prefer-top-level-if-only-type-imports option (#24502)
## Summary - Re-port upstream support for prefer-top-level-if-only-type-imports. - Allow mixed value/type imports while requiring top-level syntax for imports containing only types. - Preserve Oxlint's existing default and declaration-file behavior. - Regenerate the JSON schema and TypeScript configuration types. ## Reference https://github.com/oxc-project/oxc/issues/1117#issuecomment-4966827537 |
||
|
|
4de1624975 |
chore(deps): update dependency oxc-parser to ^0.140.0 (#24501)
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-parser](https://oxc.rs/docs/guide/usage/parser) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/napi/parser)) | [`^0.139.0` → `^0.140.0`](https://renovatebot.com/diffs/npm/oxc-parser/0.139.0/0.140.0) |  |  |  |  | --- ### 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTkuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI1OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> |
||
|
|
a43c38533a |
chore(deps): update dependency @oxc-project/types to ^0.140.0 (#24500)
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.139.0` → `^0.140.0`](https://renovatebot.com/diffs/npm/@oxc-project%2ftypes/0.139.0/0.140.0) |  |  |  |  | --- ### 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTkuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI1OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
2d4e8d2064 |
release(apps): oxlint v1.74.0 && oxfmt v0.59.0 (#24454)
# Oxlint ### 🚀 Features - |
||
|
|
df67932e6d |
fix(linter): skip suppression validation with --type-check-only (#24462)
## Summary - skip bulk suppression finalization in `--type-check-only` mode - reject `--suppress-all` and `--prune-suppressions` when combined with `--type-check-only` - add a CLI regression fixture for a still-valid regular lint suppression ## Root cause `--type-check-only` intentionally skips regular lint rules, but bulk suppression finalization still compared the full baseline against the partial runtime rule map. A file processed by type checking was marked as seen without regular rule counts, so valid regular suppressions were interpreted as stale. Suppression update operations are also unsafe with this partial result because they could remove or replace entries for rules that did not run. ## Validation - `just ready` with Node.js 24.14.0 - verified the original Dify single-file reproduction with both regular lint and `--type-check-only` ## AI usage I used OpenAI Codex to help investigate, implement, test, and prepare this pull request. I reviewed the changes and take responsibility for the submission. Fixes #24460 Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
7f80cac4fd |
perf(linter/vue/prop-name-casing): precompile ignoreProps regex pattern (#24413)
`is_ignored` in `vue/prop-name-casing` recompiled each slash-wrapped `ignoreProps` pattern with `Regex::new` for every prop it checked. This compiles the patterns once in `from_configuration` into an `Exact`/`Pattern(Regex)` matcher enum stored on the options (`serde`/`schemars`-skipped field), and matches against that. Invalid regex patterns are dropped at compile time, which preserves the previous behavior (they could never match before either, and were not compared as literals). ### Benchmark Interleaved paired-sample benchmark (N=40, alternating order, `--silent`), release binaries built from this branch and its merge-base. Fixture: 220 Vue SFCs / 35,200 props / 36.5K lines, single-rule oxlintrc with `ignoreProps: ["ignored_prop", "/^legacy/", "/_deprecated$/", "/^(alpha|beta)_/", "/[/"]` (one exact pattern, three regexes, one invalid regex). | | baseline | this branch | |---|---|---| | rule on | 66.87 ms | 16.69 ms | | parse only | 8.47 ms | 8.41 ms | Paired Δ of **+50.17 ms** (sd 2.18, t=146, faster in 40/40 pairs). The parse-only differential is null (+0.06 ms, t=0.2), so the saving is attributable to the rule and not to binary layout. That works out to 4.0× on this fixture, but the multiplier is fixture-dependent — the work removed scales with `regex_pattern_count × prop_count`, so denser configs show a larger ratio. The ~50 ms saved across 35K props is the more transferable number. ### Correctness Verified with `--format=json` (**without** `--silent`, which empties the JSON reporter's `diagnostics` array): both binaries emit the same 10,560 diagnostics, identical after sorting — the array order varies between runs because files are linted in parallel. The fixture includes canary props that are only ignored via the regex patterns, plus an invalid regex; the ignore semantics are unchanged. ### Disclosure This change was implemented and benchmarked with AI assistance (Claude Code), and has been reviewed by the submitter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
33805b9691 |
perf(linter/jsdoc/require-param): compile checkTypesPattern regex once (#24420)
AI Disclosure: Generated with Claude Code, reviewed and tested by me. I don't think there's a particularly good reason to use a RwLock like this?
This can be split into separate PRs if preferred, as it also adds the type for this rule to the generated definitions and JSON Schema.
The rule kept compiled `checkTypesPattern` regexes in a global `OnceLock<RwLock<FxHashMap<String, Regex>>>`. Every `run()` on a JSDoc-documented function:
- cloned the pattern `String` to use as the map key,
- took the RwLock **write** lock even on cache hits, serializing all linter threads through a single lock, and
- held the guard across the entire parameter check.
The pattern is fixed at configuration time, so the cache is unnecessary: this PR deserializes the option directly into a `Regex` field on the config (same approach as #24412 / #24417) and deletes the cache entirely.
## Benchmark
Paired interleaved samples (N=40), release builds, fixture of 64 files × 400 fully-documented JSDoc functions (25,600 `run()` calls, all hitting the regex path, zero violations) with only `jsdoc/require-param` enabled:
| Run | Baseline (
|
||
|
|
0433a8376a |
feat(linter/eslint/no-inner-declarations): add namespaces option (#24044)
Adds a `namespaces` option to `eslint/no-inner-declarations`:
```json
["error", "both", { "namespaces": "allow" }]
```
With `namespaces: "allow"`, `function`/`var` declarations placed directly inside a TypeScript `namespace`/`module` body are no longer reported. Declarations nested inside blocks within a namespace (e.g. `namespace N { if (x) { function f() {} } }`) are still reported. The default (`disallow`) is unchanged.
Closes #21143
|
||
|
|
a8f825eac1 | chore(oxfmt): update prettier to 3.9.5 (#24424) | ||
|
|
92f154a07c |
feat(oxlint,oxfmt): auto-discover .mts config files (#24357)
## Summary - auto-discover `oxfmt.config.mts` and `oxlint.config.mts` - watch `.mts` configs in the language server and reject `.ts`/`.mts` conflicts - add focused CLI and LSP coverage |
||
|
|
66e1a25c0e |
chore(all): fix clippy::manual_assert_eq (#24351)
|
||
|
|
e6d5cfe503 |
test(oxlint): remove redundant ignore pattern CLI test (#24353)
## Summary - remove the platform-dependent CLI snapshot test for parent-directory ignore patterns - remove the dedicated CLI fixtures and snapshot - rely on the existing `oxc_config` unit tests for pattern semantics and the existing `ConfigStoreBuilder` test for Oxlint integration |
||
|
|
83378351e4 |
fix(linter): error on ignorePatterns that cannot match files aoutside the config directory (#24341)
Follow up on #24339 - Added the same guard as Oxfmt - Since they are identical, I moved them into `oxc_config` so they can be shared |
||
|
|
87841eebfd |
chore(all): fix clippy::useless_borrows_in_formatting (#24347)
|
||
|
|
2ce5a33ecc |
fix(linter): resolve ignorePatterns relative to the config dir (#24339)
Fixes #24310 Root config's `ignorePatterns` are now resolved relative to the directory containing the config file, instead of CWD. Also fixes a latent issue: a `--config <path>` containing `..` silently disabled all `ignorePatterns` (the unnormalized parent dir never prefix-matches lint target paths). Explicit config paths are now lexically normalized, same as Oxfmt. ### Behavior change The new anchoring applies in all cases, including `--config` / LSP `configPath`. This intentionally differs from ESLint, which resolves alternate-config ignore patterns relative to CWD: - `extends`, `overrides[].files`, and JS plugin specifiers are already config-file-relative, including via `--config` - rooting only `ignorePatterns` at CWD would give one file two coordinate systems - Wrappers like Vite+ pass `--config <workspace-root config>` as an implementation detail while CWD stays at the invocation directory, so "`--config` means CWD-relative" does not hold in practice - #24276 Impact should be small: bare names (`dist`, `*.min.js`) and `**/`-prefixed patterns are unaffected by the anchor. The updated `config_ignore_patterns/with_oxlintrc` snapshot shows the `--config` case. |
||
|
|
0e00b91b5a |
chore(deps): update dependency rust to v1.97.0 (#24328)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [rust](https://redirect.github.com/rust-lang/rust) | minor | `1.96.1` → `1.97.0` | --- ### Release Notes <details> <summary>rust-lang/rust (rust)</summary> ### [`v1.97.0`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1970-2026-07-09) [Compare Source](https://redirect.github.com/rust-lang/rust/compare/1.96.1...1.97.0) \========================== <a id="1.97.0-Language"></a> ## Language - [Consider `Result<T, Uninhabited>` and `ControlFlow<Uninhabited, T>` to be equivalent to `T` for must use lint](https://redirect.github.com/rust-lang/rust/pull/148214) - [Add allow-by-default `dead_code_pub_in_binary` lint for unused pub items in binary crates](https://redirect.github.com/rust-lang/rust/pull/149509) - [Stabilize the `div32`, `lam-bh`, `lamcas`, `ld-seq-sa` and `scq` target features](https://redirect.github.com/rust-lang/rust/pull/154510) - [Stabilize `cfg(target_has_atomic_primitive_alignment)`](https://redirect.github.com/rust-lang/rust/pull/155006) - [Allow trailing `self` in imports in more cases](https://redirect.github.com/rust-lang/rust/pull/155137) <a id="1.97.0-Platform-Support"></a> ## Platform Support - [nvptx64-nvidia-cuda: drop support for old architectures and old ISAs](https://redirect.github.com/rust-lang/rust/pull/152443) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html <a id="1.97.0-Stabilized-APIs"></a> ## Stabilized APIs - [`Default for RepeatN`](https://doc.rust-lang.org/stable/std/iter/struct.RepeatN.html#impl-Default-for-RepeatN%3CA%3E) - [`Copy for ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/std/ffi/struct.FromBytesUntilNulError.html#impl-Copy-for-FromBytesUntilNulError) - [`Send for std::fs::File` on UEFI](https://redirect.github.com/rust-lang/rust/pull/154003) - [`<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_highest_one) - [`<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_lowest_one) - [`<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.highest_one) - [`<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.lowest_one) - [`<{integer}>::bit_width`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.bit_width) - [`NonZero<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_highest_one) - [`NonZero<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_lowest_one) - [`NonZero<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.highest_one) - [`NonZero<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.lowest_one) - [`NonZero<{integer}>::bit_width`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.bit_width) These previously stable APIs are now stable in const contexts: - [`char::is_control`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_control) <a id="1.97.0-Cargo"></a> ## Cargo - [Stabilize `build.warnings` config.](https://redirect.github.com/rust-lang/cargo/pull/16796) This controls how lint warnings from local packages are treated. Useful for enforcing a warning-free build in CI, replacing `-Dwarnings`. [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#buildwarnings) - [Stabilize `resolver.lockfile-path` config.](https://redirect.github.com/rust-lang/cargo/pull/16694) This allows specifying the path to the lockfile to use when resolving dependencies. Useful when working with read-only source directories. [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#resolverlockfile-path) - [cargo-clean: Error when `--target-dir` doesn't look like a Cargo target directory.](https://redirect.github.com/rust-lang/cargo/pull/16712) This prevents accidental deletion of non-target directories. - [Add `-m` shorthand for `--manifest-path`](https://redirect.github.com/rust-lang/cargo/pull/16858) - [Remove `curl` dependency from `crates-io` crate](https://redirect.github.com/rust-lang/cargo/pull/16936) <a id="1.97.0-Rustdoc"></a> ## Rustdoc - [Stabilize `--emit` flag](https://redirect.github.com/rust-lang/rust/pull/146220) - [Stabilize `--remap-path-prefix`](https://redirect.github.com/rust-lang/rust/pull/155307) <a id="1.97.0-Compatibility-Notes"></a> ## Compatibility Notes - [Emit a future-compatibility warning when relying on `f32: From<{float}>` to constrain `{float}`](https://redirect.github.com/rust-lang/rust/pull/139087) - [Rust will use the v0 symbol mangling scheme by default.](https://redirect.github.com/rust-lang/rust/pull/151994) This may cause some tools (such as debuggers or profilers, especially with old versions) to fail to demangle symbols emitted by Rust. It may also cause the formatting of text in backtraces to change. - [Prevent deref coercions in `pin!`, in order to prevent unsoundness.](https://redirect.github.com/rust-lang/rust/pull/153457) The most likely case where this might impact users is: writing `pin!(x)` where `x` has type `&mut T` will now always correctly produce a value of type `Pin<&mut &mut T>`, instead of sometimes allowing a coercion that produces a value of type `Pin<&mut T>`. This coercion was previously incorrectly allowed since Rust 1.88.0. - [Deprecate `std::char` constants and functions](https://redirect.github.com/rust-lang/rust/pull/153873) - [Warn on linker output by default](https://redirect.github.com/rust-lang/rust/pull/153968) - [Remove hidden `f64` methods which have been deprecated since 1.0](https://redirect.github.com/rust-lang/rust/pull/153975) - [report the `varargs_without_pattern` lint in deps](https://redirect.github.com/rust-lang/rust/pull/154599) - [Forbid passing generic arguments to module path segments even if the module reexports a generic enum variant](https://redirect.github.com/rust-lang/rust/pull/154971) - [Error on invalid macho `link_section` specifier](https://redirect.github.com/rust-lang/rust/pull/155065) - The encoding of certain `enum`s [have changed](https://redirect.github.com/rust-lang/rust/pull/155473). This is not a breaking change, as it only applies to `enum`s without layout guarantees, but is noted here as we've seen people impacted from having made assumptions about the layout algorithm. - [Error on `#[export_name = "..."]` where the name is empty](https://redirect.github.com/rust-lang/rust/pull/155515) - [Syntactically reject tuple index shorthands in struct patterns](https://redirect.github.com/rust-lang/rust/pull/155698) - [validate `#[link_name = "..."]` & `#[link(name = "...")]` parameters](https://redirect.github.com/rust-lang/rust/pull/155817) - On Windows, after calling `shutdown` on a socket to shut down the write side, attempting to write to the socket will now produce a `BrokenPipe` error rather than `Other`. [Map `WSAESHUTDOWN` to `io::ErrorKind::BrokenPipe`](https://redirect.github.com/rust-lang/rust/pull/156063) </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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
d193f8eb69 |
fix(linter): detect Junie agent env vars (#24277)
Closes #24275. ## Summary - add Junie as an oxlint agent detection result - detect Junie via `JUNIE_DATA` and `JUNIE_SHIM_PATH`, matching unjs/std-env#195 - cover both env variables in the existing agent detection unit test ## Verification - `cargo fmt --all --check` - `cargo test -p oxlint agent_detection` - `cargo clippy -p oxlint --all-targets --all-features -- --deny warnings` ## AI usage disclosure AI assistance was used to inspect the issue context, apply the small code change, and run verification. The change was reviewed against the upstream std-env implementation and validated with the commands above. Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
415fe1e7bb |
fix(oxfmt): error on ignorePatterns that cannot match files outside the config directory (#24286)
Patterns in `ignorePatterns` use gitignore-style matching rooted at the config file's directory, so a `..` component can never match anything. Reject such patterns at config load time instead of silently accepting them, and document the scoping. Refs: #24276 |
||
|
|
eeabc4a55f |
fix(formatter_css): bail on EOF-recovered parse errors (#24282)
Also updated the code to reflect the changes in `oxc-css-parser` 0.0.6. |
||
|
|
6df9e03160 |
chore(deps): update npm packages (#24186)
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/) | |---|---|---|---|---|---| | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`8.62.0` → `8.62.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.62.0/8.62.1) |  |  |  |  | | [@typescript-eslint/scope-manager](https://typescript-eslint.io/packages/scope-manager) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/scope-manager)) | [`8.62.0` → `8.62.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fscope-manager/8.62.0/8.62.1) |  |  |  |  | | [@typescript-eslint/visitor-keys](https://typescript-eslint.io) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys)) | [`8.62.0` → `8.62.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fvisitor-keys/8.62.0/8.62.1) |  |  |  |  | | [eslint](https://eslint.org) ([source](https://redirect.github.com/eslint/eslint)) | [`10.5.0` → `10.6.0`](https://renovatebot.com/diffs/npm/eslint/10.5.0/10.6.0) |  |  |  |  | | [prettier](https://prettier.io) ([source](https://redirect.github.com/prettier/prettier)) | [`3.9.1` → `3.9.4`](https://renovatebot.com/diffs/npm/prettier/3.9.1/3.9.4) |  |  |  |  | | [serialize-javascript](https://redirect.github.com/yahoo/serialize-javascript) | [`7.0.6` → `7.0.7`](https://renovatebot.com/diffs/npm/serialize-javascript/7.0.6/7.0.7) |  |  |  |  | | [tsx](https://tsx.hirok.io) ([source](https://redirect.github.com/privatenumber/tsx)) | [`4.22.4` → `4.22.5`](https://renovatebot.com/diffs/npm/tsx/4.22.4/4.22.5) |  |  |  |  | | [vscode-languageserver-protocol](https://redirect.github.com/Microsoft/vscode-languageserver-node) ([source](https://redirect.github.com/Microsoft/vscode-languageserver-node/tree/HEAD/protocol)) | [`3.18.1` → `3.18.2`](https://renovatebot.com/diffs/npm/vscode-languageserver-protocol/3.18.1/3.18.2) |  |  |  |  | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.62.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8621-2026-06-29) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.62.0...v8.62.1) This was a version bump only for parser to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.62.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/scope-manager)</summary> ### [`v8.62.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/scope-manager/CHANGELOG.md#8621-2026-06-29) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.62.0...v8.62.1) This was a version bump only for scope-manager to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.62.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/visitor-keys)</summary> ### [`v8.62.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/visitor-keys/CHANGELOG.md#8621-2026-06-29) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.62.0...v8.62.1) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.62.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v10.6.0`](https://redirect.github.com/eslint/eslint/releases/tag/v10.6.0) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v10.5.0...v10.6.0) #### Features - [`b1f9106`](https://redirect.github.com/eslint/eslint/commit/b1f910628e29a018c860e2352bc14cd07c853d67) feat: detect Symbol() and BigInt() in no-constant-binary-expression ([#​20981](https://redirect.github.com/eslint/eslint/issues/20981)) (Taejin Kim) - [`f291007`](https://redirect.github.com/eslint/eslint/commit/f291007cb73f55c09cf3c2aa3a405df379a5c594) feat: add checkRelationalComparisons to no-constant-binary-expression ([#​20948](https://redirect.github.com/eslint/eslint/issues/20948)) (sethamus) #### Bug Fixes - [`6b05784`](https://redirect.github.com/eslint/eslint/commit/6b05784eb271ac98ca3e1e2a48c4b14bb588c786) fix: prefer-exponentiation-operator invalid autofix at statement start ([#​20997](https://redirect.github.com/eslint/eslint/issues/20997)) (Milos Djermanovic) - [`bb9eb2a`](https://redirect.github.com/eslint/eslint/commit/bb9eb2ab28daf6e6dafc62daa6b5daf9c2b7046c) fix: account for shadowed `Boolean` in `no-extra-boolean-cast` ([#​21013](https://redirect.github.com/eslint/eslint/issues/21013)) (den$) - [`8fd8741`](https://redirect.github.com/eslint/eslint/commit/8fd8741009a3ed7845c89bfe2fb3eaa2119b2d15) fix: don't report shadowed undefined in `radix` rule ([#​21011](https://redirect.github.com/eslint/eslint/issues/21011)) (Pixel) - [`5784980`](https://redirect.github.com/eslint/eslint/commit/5784980ce8ba99556db98907895d82ef49cd0a27) fix: don't report shadowed undefined in no-throw-literal ([#​21010](https://redirect.github.com/eslint/eslint/issues/21010)) (Pixel) - [`9cd1e6d`](https://redirect.github.com/eslint/eslint/commit/9cd1e6de5bad487a9c713bdc9fda5af7ea0babcd) fix: suppress invalid class suggestion in no-promise-executor-return ([#​21008](https://redirect.github.com/eslint/eslint/issues/21008)) (Pixel) - [`d4eb2dc`](https://redirect.github.com/eslint/eslint/commit/d4eb2dc95f17cdf491edca91b7d9caf05b86253f) fix: don't report shadowed undefined in prefer-promise-reject-errors ([#​21006](https://redirect.github.com/eslint/eslint/issues/21006)) (Pixel) - [`2360464`](https://redirect.github.com/eslint/eslint/commit/23604646db6d987d01edb8aa5f4d2a88bd4c01d0) fix: prefer-promise-reject-errors false positives for shadowed Promise ([#​21003](https://redirect.github.com/eslint/eslint/issues/21003)) (den$) - [`63d52d2`](https://redirect.github.com/eslint/eslint/commit/63d52d28de705ec46f328d18166e8b7170b3f024) fix: restore max-classes-per-file report range ([#​21002](https://redirect.github.com/eslint/eslint/issues/21002)) (Pixel) - [`7feaff0`](https://redirect.github.com/eslint/eslint/commit/7feaff0cfb8d6a6260d3ea56887c9161daf8c700) fix: callback detection logic for IIFEs in max-nested-callbacks ([#​20979](https://redirect.github.com/eslint/eslint/issues/20979)) (fnx) - [`399a2ec`](https://redirect.github.com/eslint/eslint/commit/399a2ec81bcbcff2c67920db51d9276b20ac1025) fix: don't report inner non-callbacks in `max-nested-callbacks` ([#​20995](https://redirect.github.com/eslint/eslint/issues/20995)) (Milos Djermanovic) #### Documentation - [`a83683d`](https://redirect.github.com/eslint/eslint/commit/a83683db1c27193c2ad333fc5c0aedcc8a293db7) docs: Update README (GitHub Actions Bot) - [`f5449f9`](https://redirect.github.com/eslint/eslint/commit/f5449f96c2caabbc1a28b15211873e2f672f5ae5) docs: document userland patterns for global assertionOptions in RuleT… ([#​20986](https://redirect.github.com/eslint/eslint/issues/20986)) (playgirl) - [`bea49f7`](https://redirect.github.com/eslint/eslint/commit/bea49f7b2899ebf708482f977ef2ada41fd2c3f0) docs: Update README (GitHub Actions Bot) - [`e5f70f9`](https://redirect.github.com/eslint/eslint/commit/e5f70f9b06683a887dd0d6dc1cc91a9c9bea816d) docs: update code-path diagrams ([#​20984](https://redirect.github.com/eslint/eslint/issues/20984)) (Tanuj Kanti) - [`8890c2d`](https://redirect.github.com/eslint/eslint/commit/8890c2d40880b195b9167735c24ec0cc5de5eb96) docs: add TypeScript config guidance for MCP server ([#​20796](https://redirect.github.com/eslint/eslint/issues/20796)) (Pierluigi Lenoci) - [`3eb3d9b`](https://redirect.github.com/eslint/eslint/commit/3eb3d9b1b5edecc3fcae0519ddba0e3745e889e3) docs: Update README (GitHub Actions Bot) - [`c5bb59c`](https://redirect.github.com/eslint/eslint/commit/c5bb59cf613dabafd550227b6adaa9327b1095f5) docs: Update README (GitHub Actions Bot) - [`eb3c97c`](https://redirect.github.com/eslint/eslint/commit/eb3c97c776731ce11b28cc99f0271f41b9994701) docs: fix grammar in prefer-const rule description ([#​20983](https://redirect.github.com/eslint/eslint/issues/20983)) (lumir) #### Chores - [`6a42034`](https://redirect.github.com/eslint/eslint/commit/6a42034a57a816b0a313720b3b9df09455bd0b5e) ci: run ecosystem tests on main branch ([#​20891](https://redirect.github.com/eslint/eslint/issues/20891)) (sethamus) - [`3dbacdb`](https://redirect.github.com/eslint/eslint/commit/3dbacdbb31673c87ca86ecafbb18712d8d1daed8) ci: bump actions/checkout from 6 to 7 ([#​21014](https://redirect.github.com/eslint/eslint/issues/21014)) (dependabot\[bot]) - [`c3abfca`](https://redirect.github.com/eslint/eslint/commit/c3abfca7c96cc9a244f54eeb66e9971c59280354) chore: correct JSDoc param types in html formatter ([#​21018](https://redirect.github.com/eslint/eslint/issues/21018)) (Minseon Kim) - [`a832320`](https://redirect.github.com/eslint/eslint/commit/a8323209cdbefefd540c5beeaa51418d8ec40f9e) ci: split ecosystem tests into separate jobs ([#​21001](https://redirect.github.com/eslint/eslint/issues/21001)) (xbinaryx) - [`27166e7`](https://redirect.github.com/eslint/eslint/commit/27166e78511db526688afc34bbfab1a458405f3f) chore: update ecosystem plugins ([#​21005](https://redirect.github.com/eslint/eslint/issues/21005)) (ESLint Bot) - [`865d76e`](https://redirect.github.com/eslint/eslint/commit/865d76e40107d4fa10a17fc3203b303eb8a88dc3) ci: bump pnpm/action-setup from 6.0.8 to 6.0.9 ([#​20989](https://redirect.github.com/eslint/eslint/issues/20989)) (dependabot\[bot]) - [`27a88c9`](https://redirect.github.com/eslint/eslint/commit/27a88c9fa7c040f4cd39e5a5e6e2d02441c408ef) chore: update dependency markdown-it to v14 in root ([#​20994](https://redirect.github.com/eslint/eslint/issues/20994)) (Milos Djermanovic) - [`970cea6`](https://redirect.github.com/eslint/eslint/commit/970cea62b295d931a4109abedeb21ba192d3f2be) chore: update dependency markdown-it to v14 ([#​20993](https://redirect.github.com/eslint/eslint/issues/20993)) (Milos Djermanovic) - [`b482120`](https://redirect.github.com/eslint/eslint/commit/b482120bacb40204fbf16f3b20be7207057157a5) chore: update dependency prettier to v3.8.4 ([#​20990](https://redirect.github.com/eslint/eslint/issues/20990)) (renovate\[bot]) - [`6993fb3`](https://redirect.github.com/eslint/eslint/commit/6993fb3173da84999fc208507b93f523aa657448) chore: update ecosystem plugins ([#​20985](https://redirect.github.com/eslint/eslint/issues/20985)) (ESLint Bot) </details> <details> <summary>prettier/prettier (prettier)</summary> ### [`v3.9.4`](https://redirect.github.com/prettier/prettier/compare/3.9.3...3.9.4) [Compare Source](https://redirect.github.com/prettier/prettier/compare/3.9.3...3.9.4) ### [`v3.9.3`](https://redirect.github.com/prettier/prettier/compare/b875c902b0509ca1ded6d4a12667d7834c8f8d00...b875c902b0509ca1ded6d4a12667d7834c8f8d00) [Compare Source](https://redirect.github.com/prettier/prettier/compare/3.9.2...3.9.3) ### [`v3.9.2`](https://redirect.github.com/prettier/prettier/compare/3.9.1...b875c902b0509ca1ded6d4a12667d7834c8f8d00) [Compare Source](https://redirect.github.com/prettier/prettier/compare/3.9.1...3.9.2) </details> <details> <summary>yahoo/serialize-javascript (serialize-javascript)</summary> ### [`v7.0.7`](https://redirect.github.com/yahoo/serialize-javascript/compare/v7.0.6...01bec60c108143e69f6b105e443d62a13b61cbbe) [Compare Source](https://redirect.github.com/yahoo/serialize-javascript/compare/v7.0.6...v7.0.7) </details> <details> <summary>privatenumber/tsx (tsx)</summary> ### [`v4.22.5`](https://redirect.github.com/privatenumber/tsx/releases/tag/v4.22.5) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.22.4...v4.22.5) ##### Bug Fixes - isolate hook state per async module.register() registration ([a305f36](https://redirect.github.com/privatenumber/tsx/commit/a305f365f0cbcc31a44549dcbb0e63dc2883e96d)) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.22.5) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - "before 10am on monday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
81511b4568 |
chore(deps): update dependency oxfmt to ^0.58.0 (#24240)
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.57.0` → `^0.58.0`](https://renovatebot.com/diffs/npm/oxfmt/0.57.0/0.58.0) |  |  |  |  | --- ### Release Notes <details> <summary>oxc-project/oxc (oxfmt)</summary> ### [`v0.58.0`](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.57.0...oxfmt_v0.58.0) [Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.57.0...oxfmt_v0.58.0) </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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
df828933ef |
chore(deps): update oxc to ^0.139.0 (#24235)
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.138.0` → `^0.139.0`](https://renovatebot.com/diffs/npm/@oxc-project%2ftypes/0.138.0/0.139.0) |  |  |  |  | | [oxc-parser](https://oxc.rs/docs/guide/usage/parser) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/napi/parser)) | [`^0.138.0` → `^0.139.0`](https://renovatebot.com/diffs/npm/oxc-parser/0.138.0/0.139.0) |  |  |  |  | --- ### Release Notes <details> <summary>oxc-project/oxc (@​oxc-project/types)</summary> ### [`v0.139.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxc-types/CHANGELOG.md#01390---2026-07-06) ##### 🐛 Bug Fixes - [`0b25582`](https://redirect.github.com/oxc-project/oxc/commit/0b25582) ast: Type binding node `typeAnnotation` as `TSTypeAnnotation | null` ([#​23113](https://redirect.github.com/oxc-project/oxc/issues/23113)) (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 becomes conflicted, 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
39677ba50d |
release(apps): oxlint v1.73.0 && oxfmt v0.58.0 (#24219)
# Oxlint ### 🚀 Features - |
||
|
|
b732abd8dd |
chore(oxfmt): update prettier to 3.9.4 (#24201)
Update to the latest before our release. |
||
|
|
2121a552ba |
fix(oxfmt): reuse tinypool process during the same LSP process (#24197)
Fixes #24147, closes #24183. |
||
|
|
fed5083e58 |
chore(deps): update rust crate napi to v3.10.3 (#24150)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [napi](https://crates.io/crates/napi) | workspace.dependencies | patch | `3.10.2` → `3.10.3` | --- ### 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
0b25582851 |
fix(ast): type binding node typeAnnotation as TSTypeAnnotation | null (#23113)
Closes #22134 ## Problem The generated parser TypeScript types declare `typeAnnotation` as `null` for binding nodes, but the parser emits a real `TSTypeAnnotation` at runtime when the binding is annotated: ```ts const x: string = "foo"; // x.typeAnnotation.typeAnnotation.type === "TSStringKeyword" at runtime, // but types.d.ts said `typeAnnotation?: null` ``` This is a generated-type gap, not a runtime bug. A `BindingIdentifier` has no `type_annotation` field of its own — the annotation is stored on the parent (`VariableDeclarator`, `FormalParameter`, `CatchParameter`) and hoisted onto the node during serialization by `BindingPatternKindAndTsFields`. The `add_fields(typeAnnotation = TsNull)` placeholder (`ts_type = "null"`) only reflects the standalone case (function/class `id`, import `local`), where `null` is correct. ## Fix Add a `TsTypeAnnotationOrNull` meta-type that serializes/deserializes exactly like `TsNull` but is typed `TSTypeAnnotation | null`, and use it for the four nodes that can carry a hoisted annotation: - `BindingIdentifier` — `const x: string`, `function f(a: string)`, `catch (e: unknown)` - `ObjectPattern` — `const { a }: T = obj` - `ArrayPattern` — `const [a]: T = arr` - `BindingRestElement` — `function f(...rest: T[])` Left as `null` (cannot carry an annotation): `IdentifierReference`, `IdentifierName`, `LabelIdentifier`, `AssignmentPattern` (its own annotation is always `null`; the annotation goes on `left`), and the `AssignmentTarget*` nodes (expression LHS, never annotated). This lines up with the `typescript-estree` shape the parser targets, where the identifier node declares `typeAnnotation: TSTypeAnnotation | undefined`. ## Notes - **Type-only change.** `TsTypeAnnotationOrNull::serialize` is byte-identical to `TsNull::serialize`, so runtime serialization and the raw-transfer deserializer are unchanged — no conformance/snapshot movement. - Generated files (`derive_estree.rs`, `npm/oxc-types/types.d.ts`, `apps/oxlint/src-js/generated/types.d.ts`) regenerated via `just ast`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
a2c97f348c |
feat(linter/unicorn): implement explicit-timer-delay rule (#23612)
this PR implements `unicorn/explicit-timer-delay`, issue #684 Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
bdb51c73da |
fix(linter/jest/prefer-ending-with-an-expect): validate config patterns (#24122)
## Summary - deserialize rule options through `DefaultRuleConfig` - convert and validate configured assertion function patterns during deserialization - propagate invalid regex configuration errors instead of panicking at lint runtime Closes [oxc-project/oxc#23644](https://github.com/oxc-project/oxc/pull/23644) |
||
|
|
4f4313ef47 |
feat(formatter_css): update oxc-css-parser 0.0.5 (#24120)
Fixes #24000, #24057, and #24116. Updating `oxc-css-parser` to 0.0.4 involved a massive amount of fixes, making it a major update. However, this should allow us to catch cases that were previously missed (even potentially). |
||
|
|
85735cb5df |
feat(linter/unicorn): implement no-confusing-array-with rule (#23638)
Implements unicorn/no-confusing-array-with, which flags two ways Array#with() calls can silently misbehave: A literal negative index (array.with(-1, value)). Unlike slice()/splice(), with() treats a negative index as an offset from the end of the array, which is easy to assume incorrectly. .length used as the index (array.with(array.length, value)), which is always out of bounds and always produces a RangeError / unintended result, since valid indices run 0 .. length - 1. --------- Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
0ccd8a14b7 |
feat(formatter_graphql): update oxc-graphql-parser 0.0.5 (#24106)
Part of #23923 Supports more syntax like: - Fragment arguments - Extends directives |
||
|
|
cd2452e170 |
fix(formatter_css): align SCSS output to Prettier 3.9.1 (#24097)
Part of #23923 Addressed these changes: - https://github.com/prettier/prettier/blob/79f6cdfd9873a91be9b25c9c6a41d26dcd9a6656/changelog_unreleased/scss/18530.md - https://github.com/prettier/prettier/blob/79f6cdfd9873a91be9b25c9c6a41d26dcd9a6656/changelog_unreleased/scss/18535.md - https://github.com/prettier/prettier/blob/79f6cdfd9873a91be9b25c9c6a41d26dcd9a6656/changelog_unreleased/scss/19091.md and also fixed minor formatting diffs regarding to trailing comment in map. ```scss $m: ( a: 1, b: 2, // THIS ); ``` |
||
|
|
7d663d3fd0 |
chore(oxfmt): update prettier to 3.9.1 (#23931)
Part of https://github.com/oxc-project/oxc/issues/23923 |
||
|
|
cb4fbb927f |
feat(linter/eslint): implement no-unreachable-loop rule (#23975)
## Summary - add native `eslint/no-unreachable-loop` support - support the ESLint `ignore` option for loop statement types - reuse `no-unreachable`'s effective CFG reachability helper (`effective_unreachable_blocks`) - generate oxlint config schema/types and rule metadata ## Why `no-unreachable-loop` is currently missing from Oxlint's ESLint rule coverage. The rule catches loops whose body cannot reach a second iteration, while preserving ESLint-compatible behavior for unreachable loops and configured ignored loop types. ## Performance The effective-reachability helper is a whole-CFG traversal. It is only needed to recognize a loop that is dead code *after* an infinite loop; the next-iteration search prunes infinite loops on its own. So the analysis runs on the CFG's base reachability first and builds the corrected map only when a loop would otherwise be reported *and* is a static infinite loop — a rare path the common case never hits. This keeps the rule self-contained and brings the `linter[binder.ts]` and `linter[kitchen-sink.tsx]` benches from a ~4-5% regression down to noise. ## AI Assistance This PR was implemented with AI assistance. --------- Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
dc321127fa |
feat(linter/eslint/no-constant-binary-expression): check relational comparisons (#24088)
## Summary - add `checkRelationalComparisons` support to `no-constant-binary-expression` - default the Oxc option to `true` and allow explicit opt-out with `false` - port the ESLint relational comparison test cases into the existing rule fixture |
||
|
|
89ec3d9f4b |
feat(formatter_core): add literal line and root indention primitives (#24051)
IR primitives required for future YAML and Markdown support. At the same time, this has resolved the workarounds used in embedded such as markdown-in-js / js-in-vue, etc. |
||
|
|
d963967079 |
feat(linter/unicorn/no-array-sort): add allowAfterSpread option (#24043)
Adds an `allowAfterSpread` option (default `false`) to `unicorn/no-array-sort`. When enabled, sorting a freshly-spread array (`[...iterable].sort()`) is allowed — it doesn't mutate an existing array and avoids the extra allocation `toSorted()` would incur when sorting a non-array iterable such as a `Set`. `array.sort()` is still reported (not a spread), and `[...array].sort()` is still reported when the option is off. Closes #20544 |
||
|
|
45d607d485 |
fix(linter/react/forbid-component-props): make allow/disallow lists optional in schema (#24024)
`ForbidItemObject` derives `JsonSchema`, but its manual `Deserialize` impl already defaults the four allow/disallow `Vec` fields. Without `#[serde(default)]`, schemars marked them as `required` in the generated configuration schema, so editors/tooling wrongly required all four (`allowedFor`, `allowedForPatterns`, `disallowedFor`, `disallowedForPatterns`) whenever the object form of `react/forbid-component-props` was used. Add `#[serde(default)]` to the four fields and regenerate the schema — the `required` array is dropped and each field gets `"default": []`. Closes #23732 |
||
|
|
0a75682fcb |
feat(linter): add per-rule timings for type-aware linting (#22488)
Adds support for collecting rule timings from tsgolint. Adds a new kind of payload that contains timing information. Threads the `timing` state variable down through the lint runner builders for consistency with other similar pieces of state. I've updated the timing store merging code to be generic, so we can accept just about anything that can produce timing records. Then, we utilize that in the `tsgolint` code. |
||
|
|
743e22293b |
feat(linter/react): add disallowedValues option for forbid-dom-props rule (#23970)
fixes #23049. Tests regenerated from upstream |
||
|
|
d8c68f818b |
chore(deps): update oxc to ^0.138.0 (#23947)
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.137.0` → `^0.138.0`](https://renovatebot.com/diffs/npm/@oxc-project%2ftypes/0.137.0/0.138.0) |  |  |  |  | | [oxc-parser](https://oxc.rs/docs/guide/usage/parser) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/napi/parser)) | [`^0.137.0` → `^0.138.0`](https://renovatebot.com/diffs/npm/oxc-parser/0.137.0/0.138.0) |  |  |  |  | --- ### Release Notes <details> <summary>oxc-project/oxc (oxc-parser)</summary> ### [`v0.138.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/napi/parser/CHANGELOG.md#01380---2026-06-29) ##### 🛡️ Security - [`3cdd18f`](https://redirect.github.com/oxc-project/oxc/commit/3cdd18f) deps: Update npm packages ([#​23690](https://redirect.github.com/oxc-project/oxc/issues/23690)) (renovate\[bot]) </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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
ea5d09534d |
fix(oxfmt): update --migrate prettier (#23963)
A bit outdated, updated it to reflect the latest situation. - Support `svelte` migration - Better (but not yet complete) `overrides` detection - Remove warning about `embeddedLanguageFormatting` (already supported) - etc |