Commit Graph

2615 Commits

Author SHA1 Message Date
camc314 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.
2026-07-17 14:32:23 +00:00
leaysgur 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.
2026-07-17 01:07:45 +00:00
leaysgur 33e32d8e51 fix(formatter_css): use line_suffix for EOL line comment (#24580)
The same motivation as #24579
2026-07-16 01:37:31 +00:00
camc314 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.
2026-07-15 14:48:32 +00:00
connorshea 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.
2026-07-15 10:13:29 +00:00
Cole Ellison 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>
2026-07-14 18:34:00 +01:00
Mikhail Baev 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>
2026-07-14 18:22:11 +01:00
camc314 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
2026-07-14 09:25:16 +00:00
renovate 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) | ![age](https://developer.mend.io/api/mc/badges/age/npm/oxc-parser/0.140.0?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxc-parser/0.140.0?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxc-parser/0.139.0/0.140.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxc-parser/0.139.0/0.140.0?slim=true) |

---

### 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-->
2026-07-14 08:49:22 +00:00
renovate[bot] 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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@oxc-project%2ftypes/0.140.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@oxc-project%2ftypes/0.140.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@oxc-project%2ftypes/0.139.0/0.140.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@oxc-project%2ftypes/0.139.0/0.140.0?slim=true)
|

---

### 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>
2026-07-14 09:40:27 +01:00
oxc-guard[bot] 2d4e8d2064 release(apps): oxlint v1.74.0 && oxfmt v0.59.0 (#24454)
# Oxlint
### 🚀 Features

- 0433a83 linter/eslint/no-inner-declarations: Add `namespaces` option
(#24044) (Boshen)
- 92f154a oxlint,oxfmt: Auto-discover `.mts` config files (#24357)
(camc314)
- 8c1d74b linter/import/no-duplicates: Add autofix logic (#24273) (Cole
Ellison)

### 🐛 Bug Fixes

- 0b086de linter/jest/prefer-lowercase-title: False positive when
`lowercaseFirstCharacterOnly` is false (#24414) (Connor Shea)
- 097cb95 linter: Allow `vite-plus/test` and `@effect as Vitest source
(#24196) (Liang)
- 8337835 linter: Error on `ignorePatterns` that cannot match files
aoutside the config directory (#24341) (leaysgur)
- 9ba30e5 linter/oxc/bad-replace-all-arg: Add note to enhance diagnostic
(#24346) (camc314)
- 2ce5a33 linter: Resolve `ignorePatterns` relative to the config dir
(#24339) (leaysgur)
- ab90eed linter/eslint/no-loop-func: Do not error on catch variables
(#24316) (Chris Opperwall)
- b67f0a6 linter/eslint/no-unused-vars: Count default parameter updates
as usage (#24323) (camc314)
- d193f8e linter: Detect Junie agent env vars (#24277) (Jeevan Mohan
Pawar)
- 2aecf60 linter/eslint/no-unreachable: Handle `break` in switch stmts
correctly (#24260) (camc314)

### ⚡ Performance

- 7f80cac linter/vue/prop-name-casing: Precompile `ignoreProps` regex
pattern (#24413) (connorshea)
- 6272051 linter/typescript/no-require-imports: Compile allow patterns
once (#24417) (connorshea)
- fb1edf1 linter: Compute comment fix span only for directive comments
(#24419) (connorshea)
- 33805b9 linter/jsdoc/require-param: Compile checkTypesPattern regex
once (#24420) (connorshea)
- 8de6fca linter/jest/valid-title: Compile disallowedWords regex once
(#24412) (Connor Shea)
- 4a0d8dc linter/eslint/no-underscore-dangle: Avoid String clone per
identifier (#24371) (Ian Macalinao)
- f3ab04c linter/typescript/consistent-type-imports: Remove redundant
Vec per violation (#24370) (Ian Macalinao)
- 4d2d78d linter/typescript/prefer-ts-expect-error: Avoid String clone
per comment (#24369) (Ian Macalinao)
# Oxfmt
### 🚀 Features

- 3a7fe74 formatter_css: Update oxc-css-parser to 0.0.7 (#24434)
(leaysgur)
- 0173cd3 formatter_css: Format Less :extend and merge props (#24358)
(leaysgur)
- 92f154a oxlint,oxfmt: Auto-discover `.mts` config files (#24357)
(camc314)
- df250df formatter: Support `quoteProps` for TS enum and methods
(#24309) (leaysgur)
- a9a5cd6 formatter_core: Expose `SourceText::as_str()` (#24281)
(leaysgur)

### 🐛 Bug Fixes

- 162bddf formatter: Add required parens for conditional type in type
parameter constraint (#24450) (leaysgur)
- 2d22a91 formatter: Determine type cast target from span instead of
lexical scan (#24447) (leaysgur)
- 25306e9 formatter: Do not add extra parens with type cast comment
(#24444) (leaysgur)
- bd6edfe formatter: Break arrow signature that exactly fills the line
when cond body may hug (#24440) (leaysgur)
- a99ef41 formatter: Keep quotes on method signature named new (#24432)
(leaysgur)
- fcc28df formatter_css: Keep glued-braket-value tight (#24352)
(leaysgur)
- 8337835 linter: Error on `ignorePatterns` that cannot match files
aoutside the config directory (#24341) (leaysgur)
- b7c7e15 formatter: Add parens for import and private field in new
callee chain (#24320) (leaysgur)
- 0c8f6e4 formatter: Update detect_code_removal for #24309 (#24314)
(leaysgur)
- a85aad0 formatter: Fix member-chain and non-null parens (#24312)
(leaysgur)
- 1c29c73 formatter: Preserve `TSNonNullExpression` in chain expression
(#24311) (leaysgur)
- 8933c0e formatter: Keep comment inside of empty `switch` block
(#24308) (leaysgur)
- ec26af2 formatter: Preserve blank lines between JSX attrs (#24290)
(leaysgur)
- 70bd54d formatter: Keep arrow function body comment (#24287)
(leaysgur)
- 415fe1e oxfmt: Error on ignorePatterns that cannot match files outside
the config directory (#24286) (leaysgur)
- eeabc4a formatter_css: Bail on EOF-recovered parse errors (#24282)
(leaysgur)
- 42ec8de formatter: Keep comments inside surviving parens and
suppressed statement terminators (#24253) (leaysgur)
- 1343779 formatter: Keep comment inline for empty statements (#24249)
(leaysgur)
- b996579 formatter: Print ; before trailing comments part 2 (#24246)
(leaysgur)
- 4f86e8c formatter: Print `;` before trailing comments (#24244)
(leaysgur)
- 01252e4 formatter: Add or remove parens for `let` declaration (#24215)
(leaysgur)

### ⚡ Performance

- eeb1913 formatter_core: Avoid per-call `Vec` work-stack in soft-line
removal (#23775) (Marius Schulz)
- a2f255b formatter: Use `SmallVec` for `MemberChain` collections
(#23776) (Marius Schulz)

### 📚 Documentation

- b52d0f5 formatter: Add TODO comment about unsound code (#24372)
(overlookmotel)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2026-07-14 15:02:14 +08:00
Stephen Zhou 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>
2026-07-13 14:49:11 +01:00
connorshea 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)
2026-07-13 09:42:13 +00:00
connorshea 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 (8de6fca) | This PR | Result |
|---|---|---|---|
| Rule enabled | 56.95 ms | 18.25 ms | **3.12×**, t=132.8, 40/0 wins |
| Parse-only null control (same fixture) | 11.05 ms | 10.75 ms | 1.03×, t=1.5 — noise |

Subtracting the ~11 ms parse floor, rule execution drops from ~46 ms to ~7 ms (~6.4×). The win is mostly the removed cross-thread lock contention, so it scales with file count on multi-core machines.

## Correctness

- Diagnostics are byte-identical between baseline and this PR on a mixed pass/fail canary, under both the default config and a custom `checkTypesPattern` config (which changes reporting, confirming the option deserializes and takes effect).
- `oxc_linter` lib tests (1,169), `oxlint` tests (396), and clippy pass; the generated website rule-doc page is byte-identical (`schemars(with = "String", default)` preserves the documented default).

## Invalid patterns are now a config error, not a panic

An invalid `checkTypesPattern` previously panicked lazily, on the first checked function. It now fails config loading with a proper diagnostic:

```
Failed to parse oxlint configuration file.

  x Invalid configuration for rule `jsdoc/require-param`:
  |   regex parse error:
  |     ^(unclosed
  |      ^
  | error: unclosed group
```

To get there, two things changed:

- The regex deserializer lives in `utils/config.rs` alongside the existing `deserialize_regex_option` / `deserialize_regex_vec` / `deserialize_required_regex_option` family, and builds via `RegexBuilder` with `D::Error::custom` like they all do.
- `from_configuration` propagates the serde error instead of dropping it with `.ok()`. The linter already has the plumbing for this — `config/rules.rs` turns an `Err` into `OverrideRulesError::RuleConfiguration` — the `.ok()` was just discarding it.

### Behavior change worth flagging

Now that `from_configuration` no longer swallows errors, this config's `deny_unknown_fields` is load-bearing for the first time. A config carrying an `eslint-plugin-jsdoc` option that oxc doesn't implement (e.g. `unnamedRootBase`) previously fell back to defaults silently; it now fails to load with an "unknown field" error. No lint *results* change, but a user porting an eslint-plugin-jsdoc config that oxc previously tolerated will now see a config error.

That surfaced in the ported test suite: eight cases configure `unnamedRootBase` (×5), `enableFixer` (×2), `enableRootFixer`, and `autoIncrementBase`, none of which this rule implements. They're commented out, and the snapshot is regenerated accordingly.

If maintainers would rather keep the lenient behavior, the alternative is to validate `checkTypesPattern` up front and keep the `.ok()` fallback for everything else — that removes the panic without touching any test or changing config tolerance. Happy to switch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-07-13 09:27:37 +00:00
Boshen 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
2026-07-13 01:59:31 +00:00
leaysgur a8f825eac1 chore(oxfmt): update prettier to 3.9.5 (#24424) 2026-07-13 00:13:32 +00:00
camc314 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
2026-07-10 11:38:35 +00:00
camc314 66e1a25c0e chore(all): fix clippy::manual_assert_eq (#24351) 2026-07-10 09:57:05 +00:00
camc314 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
2026-07-10 09:50:52 +00:00
leaysgur 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
2026-07-10 09:05:48 +00:00
camc314 87841eebfd chore(all): fix clippy::useless_borrows_in_formatting (#24347) 2026-07-10 09:01:12 +00:00
leaysgur 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.
2026-07-10 08:39:56 +00:00
renovate[bot] 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>
2026-07-09 18:34:23 +01:00
Jeevan Mohan Pawar 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>
2026-07-08 12:03:02 +01:00
leaysgur 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
2026-07-08 05:31:23 +00:00
leaysgur 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.
2026-07-08 02:17:08 +00:00
renovate[bot] 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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fparser/8.62.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fparser/8.62.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fparser/8.62.0/8.62.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fparser/8.62.0/8.62.1?slim=true)
|
|
[@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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fscope-manager/8.62.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fscope-manager/8.62.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fscope-manager/8.62.0/8.62.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fscope-manager/8.62.0/8.62.1?slim=true)
|
| [@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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fvisitor-keys/8.62.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fvisitor-keys/8.62.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fvisitor-keys/8.62.0/8.62.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fvisitor-keys/8.62.0/8.62.1?slim=true)
|
| [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) |
![age](https://developer.mend.io/api/mc/badges/age/npm/eslint/10.6.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint/10.6.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint/10.5.0/10.6.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint/10.5.0/10.6.0?slim=true)
|
| [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) |
![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.9.4?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier/3.9.4?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier/3.9.1/3.9.4?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.9.1/3.9.4?slim=true)
|
|
[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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/serialize-javascript/7.0.7?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/serialize-javascript/7.0.7?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/serialize-javascript/7.0.6/7.0.7?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/serialize-javascript/7.0.6/7.0.7?slim=true)
|
| [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) |
![age](https://developer.mend.io/api/mc/badges/age/npm/tsx/4.22.5?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tsx/4.22.5?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tsx/4.22.4/4.22.5?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tsx/4.22.4/4.22.5?slim=true)
|
|
[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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/vscode-languageserver-protocol/3.18.2?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vscode-languageserver-protocol/3.18.2?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vscode-languageserver-protocol/3.18.1/3.18.2?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vscode-languageserver-protocol/3.18.1/3.18.2?slim=true)
|

---

### Release Notes

<details>
<summary>typescript-eslint/typescript-eslint
(@&#8203;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
(@&#8203;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
(@&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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`
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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`
([#&#8203;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…
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;21001](https://redirect.github.com/eslint/eslint/issues/21001))
(xbinaryx)
-
[`27166e7`](https://redirect.github.com/eslint/eslint/commit/27166e78511db526688afc34bbfab1a458405f3f)
chore: update ecosystem plugins
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;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
([#&#8203;20990](https://redirect.github.com/eslint/eslint/issues/20990))
(renovate\[bot])
-
[`6993fb3`](https://redirect.github.com/eslint/eslint/commit/6993fb3173da84999fc208507b93f523aa657448)
chore: update ecosystem plugins
([#&#8203;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 (@&#8203;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>
2026-07-07 11:24:38 +01:00
renovate[bot] 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) |
![age](https://developer.mend.io/api/mc/badges/age/npm/oxfmt/0.58.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxfmt/0.58.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxfmt/0.57.0/0.58.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxfmt/0.57.0/0.58.0?slim=true)
|

---

### 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>
2026-07-07 10:23:12 +01:00
renovate[bot] 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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@oxc-project%2ftypes/0.139.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@oxc-project%2ftypes/0.139.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@oxc-project%2ftypes/0.138.0/0.139.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@oxc-project%2ftypes/0.138.0/0.139.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.138.0` →
`^0.139.0`](https://renovatebot.com/diffs/npm/oxc-parser/0.138.0/0.139.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/oxc-parser/0.139.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxc-parser/0.139.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxc-parser/0.138.0/0.139.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxc-parser/0.138.0/0.139.0?slim=true)
|

---

### Release Notes

<details>
<summary>oxc-project/oxc (@&#8203;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`
([#&#8203;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>
2026-07-06 19:29:31 +01:00
oxc-guard[bot] 39677ba50d release(apps): oxlint v1.73.0 && oxfmt v0.58.0 (#24219)
# Oxlint
### 🚀 Features

- 7db7a29 allocator: Add `ReplaceWith` trait (#24012) (overlookmotel)
- a2c97f3 linter/unicorn: Implement `explicit-timer-delay` rule (#23612)
(Mikhail Baev)
- 85735cb linter/unicorn: Implement `no-confusing-array-with` rule
(#23638) (Shekhu☺️)
- cb4fbb9 linter/eslint: Implement no-unreachable-loop rule (#23975)
(Todor Andonov)
- dc32112 linter/eslint/no-constant-binary-expression: Check relational
comparisons (#24088) (camc314)
- 439c344 linter/jsdoc: Added missing options to `jsdoc/require-param`
rule (#23364) (kapobajza)
- 62af717 linter/unicorn/filename-case: Add `lowercase` and
`screamingSnakeCase` (#24045) (Boshen)
- d963967 linter/unicorn/no-array-sort: Add `allowAfterSpread` option
(#24043) (Boshen)
- 0a75682 linter: Add per-rule timings for type-aware linting (#22488)
(camchenry)
- 743e222 linter/react: Add `disallowedValues` option for
`forbid-dom-props` rule (#23970) (Mikhail Baev)

### 🐛 Bug Fixes

- 7b80010 linter: Use direct binding symbol ids (#24216) (camc314)
- 8f94b49 linter/import/no-duplicates: Don't flag a type-only import
beside a side-effect import (#24030) (Boshen)
- d8c3fee linter/react/rules-of-hooks: Flag `useEffectEvent` escapes
(#23764) (Rayan Salhab)
- 0a7312b linter/no-deprecated-functions: Map `require.requireActual` to
`jest.requireActual` (#23627) (Jerry Zhao)
- d9e3ab3 linter/eslint/no-useless-return: Handle switch case
continuation (#23984) (camc314)
- 0b25582 ast: Type binding node `typeAnnotation` as `TSTypeAnnotation |
null` (#23113) (Boshen)
- 122d112 linter/eslint/no-restricted-imports: Flag dynamic import()
expressions (#24029) (Boshen)
- 59b6b83 linter: Avoid `OnceLock` re-entry on cyclic `export *`
re-exports (#23632) (Jerry Zhao)
- dd09af0 linter/import/namespace: Avoid panic on destructuring of an
unresolvable namespace re-export (#23626) (Jerry Zhao)
- bdb51c7 linter/jest/prefer-ending-with-an-expect: Validate config
patterns (#24122) (camc314)
- e383843 linter/unicorn/prefer-modern-dom-apis: Skip fixer for non
identifier arguments (#23630) (Jerry Zhao)
- 0ac4c83 linter: Detect circular config extends (#24115) (camc314)
- bae1edf linter/import/namespace: Check namespace imports after named
imports (#24094) (camc314)
- cd8fdfe linter/eslint/no-eval: Recognize Array.from family thisArg
(#24091) (camc314)
- 851ee43 linter/eslint/no-eval: Resolve this binding for functions
returned from an IIFE (#23643) (Jerry Zhao)
- 002ab35 linter/unicorn: Avoid prefer-array-find rest destructuring
false positive (#23654) (ColemanDunn)
- 01c8775 linter/unicorn/filename-case: Keep digits attached in
screamingSnakeCase (#24056) (Boshen)
- f256941 linter: Recognize `@effect/vitest` as a vitest import source
(#24025) (Boshen)
- 73eeb1d linter/import/extensions: Honor per-extension `never` for
explicit extensions (#24031) (Boshen)
- d4ebe1f linter: Reject non-object oxlint config files (#24026)
(Boshen)
- 45d607d linter/react/forbid-component-props: Make allow/disallow lists
optional in schema (#24024) (Boshen)
- 54076ad linter/unicorn/no-array-for-each: Suggest entries loop for
index callbacks (#24004) (camc314)
- d057736 linter/jsdoc: Avoid param root underflow (#23945) (camc314)
- 29c76bf linter/unicorn/prefer-at: Skip object numeric-key access
(#23909) (Gaurav Dubey)

### ⚡ Performance

- 657a8fc linter/oxc/bad-array-method-on-arguments: Only run on member
expressions instead of all identifiers (#24164) (camchenry)
- 073d9e7 linter/eslint/prefer-rest-params: Run on functions instead of
all identifiers (#24163) (camchenry)
- e5a4162 linter/jest/no-confusing-set-timeout: Early exit fast path
(#24092) (camc314)
- bca7ce5 linter: Only run react-perf rules on JSX attribute nodes
(#24083) (camchenry)
- 6881bf6 linter: Compute `apply_overrides` rule set lazily (#23648)
(Jerry Zhao)
- 911c106 linter/eslint/no-obj-calls: Use resolved reference instead of
scope walk (#23895) (Marius Schulz)
- dc8fd9a linter/unicorn/prefer-dom-node-text-content: Change dispatch
to run only on less common node types (#23897) (Connor Shea)
- fdbd34d linter/eslint/no-useless-call: Fast-path static callees
(#24077) (camc314)
- b1be114 linter/import/extensions: Skip empty config and borrow
extensions (#24075) (camc314)
- 4781b2d linter/eslint/no-obj-calls: Use direct global matches (#24076)
(camc314)
- e6cee89 linter: Avoid node-chain allocation for non-Jest calls
(#23907) (Yagiz Nizipli)
- 30dc517 linter/typescript/no-restricted-types: O(1) banned-type
lookups (#23827) (Yagiz Nizipli)

### 📚 Documentation

- 6ca9125 linter/typescript: Clarify consistent-type-imports behavior
(#23972) (camc314)
# Oxfmt
### 🚀 Features

- 4f4313e formatter_css: Update oxc-css-parser 0.0.5 (#24120) (leaysgur)
- 0ccd8a1 formatter_graphql: Update oxc-graphql-parser 0.0.5 (#24106)
(leaysgur)
- 89ec3d9 formatter_core: Add literal line and root indention primitives
(#24051) (leaysgur)
- 213a96b formatter_core: Add no-expand-parent for multiline text
(#24050) (leaysgur)
- 0e5bcc9 formatter_graphql: Update oxc-graphql-parser 0.0.4 (#24039)
(leaysgur)
- e0b35a1 formatter_css: Update `oxc-css-parser@0.0.3` (#23974)
(leaysgur)

### 🐛 Bug Fixes

- 1fe6546 formatter: Omit unneeded `;` for type members with `no-semi`
(#24212) (leaysgur)
- 0ad7316 formatter: Print space for `ForStatement`.`update` only if
exists (#24211) (leaysgur)
- 3abbed5 formatter: Print `;` before jsdoc type-cast parens with
no-semi (#24208) (leaysgur)
- 9af3833 formatter_css: Make scss formatter consistent (#24207)
(leaysgur)
- 46d7194 formatter_css: Use fill IR for `@forward` members (#24206)
(leaysgur)
- e31038f formatter_css: Keep comment inside sass config list (#24205)
(leaysgur)
- d3b9591 formatter: Add parens around `await/yield` with `<T>` (#24202)
(leaysgur)
- 2121a55 oxfmt: Reuse tinypool process during the same LSP process
(#24197) (leaysgur)
- 9bf4b4a formatter_css: Align CSS output to Prettier 3.9.1 (#24100)
(leaysgur)
- cd2452e formatter_css: Align SCSS output to Prettier 3.9.1 (#24097)
(leaysgur)
- 4ee8745 formatter_css: Keep selector value contain line-break without
breaking line (#24055) (leaysgur)
- e1ece97 formatter_graphql: Break `implements` list by print-width
(#23997) (leaysgur)
- 0a6b16c formatter_json: Preserve key and literal value for
json-stringify (#23996) (leaysgur)
- 903ab6e formatter_css: Preserve newlines in css-in-js selector list
(#23992) (leaysgur)
- ea5d095 oxfmt: Update `--migrate prettier` (#23963) (leaysgur)

### ⚡ Performance

- 468e1e3 formatter_core: Make printer queues cursor-based (#24098)
(Boshen)
- c59f2fe rust: Return impl ExactSizeIterator from slice-backed
accessors (#24144) (Boshen)
- c292fb2 formatter: Inline fits element dispatcher (#23982) (camc314)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2026-07-06 23:26:00 +08:00
leaysgur b732abd8dd chore(oxfmt): update prettier to 3.9.4 (#24201)
Update to the latest before our release.
2026-07-06 02:00:31 +00:00
leaysgur 2121a552ba fix(oxfmt): reuse tinypool process during the same LSP process (#24197)
Fixes #24147, closes #24183.
2026-07-06 00:55:31 +00:00
renovate[bot] 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>
2026-07-05 14:38:55 +01:00
Boshen 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)
2026-07-03 16:17:53 +01:00
Mikhail Baev 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>
2026-07-03 16:08:33 +01:00
camc314 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)
2026-07-03 14:31:16 +00:00
leaysgur 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).
2026-07-03 14:06:30 +00:00
Shekhu☺️ 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>
2026-07-03 15:06:08 +01:00
leaysgur 0ccd8a14b7 feat(formatter_graphql): update oxc-graphql-parser 0.0.5 (#24106)
Part of #23923

Supports more syntax like:

- Fragment arguments
- Extends directives
2026-07-03 10:11:20 +00:00
leaysgur 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
);
```
2026-07-03 07:29:32 +00:00
leaysgur 7d663d3fd0 chore(oxfmt): update prettier to 3.9.1 (#23931)
Part of https://github.com/oxc-project/oxc/issues/23923
2026-07-03 07:12:06 +00:00
Todor Andonov 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>
2026-07-02 21:07:07 +01:00
camc314 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
2026-07-02 19:33:13 +00:00
leaysgur 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.
2026-07-02 08:14:03 +00:00
Boshen 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
2026-07-02 07:19:18 +00:00
Boshen 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
2026-07-02 01:25:23 +00:00
camchenry 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.
2026-07-01 02:51:18 +00:00
Mikhail Baev 743e22293b feat(linter/react): add disallowedValues option for forbid-dom-props rule (#23970)
fixes #23049. Tests regenerated from upstream
2026-06-30 09:06:52 +01:00
renovate[bot] 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)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@oxc-project%2ftypes/0.138.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@oxc-project%2ftypes/0.138.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@oxc-project%2ftypes/0.137.0/0.138.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@oxc-project%2ftypes/0.137.0/0.138.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.137.0` →
`^0.138.0`](https://renovatebot.com/diffs/npm/oxc-parser/0.137.0/0.138.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/oxc-parser/0.138.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxc-parser/0.138.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxc-parser/0.137.0/0.138.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxc-parser/0.137.0/0.138.0?slim=true)
|

---

### 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
([#&#8203;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>
2026-06-30 08:46:08 +01:00
leaysgur 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
2026-06-30 00:59:07 +00:00