Files
ch3rry aa49d86046 fix(linter): allow spread rule options in config types (#25675)
## Summary

- represent variadic rule options as a severity followed by zero or more
option values
- regenerate the Oxlint configuration schema and TypeScript declarations
- add a type-level regression for mapped options spread into
`no-restricted-globals`

## Root cause

The schema wrapper materialized the first `additionalItems` entry as a
required tuple element and set `minItems` to 2. A dynamic TypeScript
spread has type `T[]` and may be empty, so it cannot satisfy that
required position even though the severity-only form is already valid
through `RuleNoConfig`.

Keeping severity as the only fixed tuple item and leaving the rule
options in `additionalItems` generates `[severity, ...options]`, which
accepts both an empty spread and populated spreads without changing
runtime rule behavior.

Closes #25666


## AI assistance

Implemented with assistance from OpenAI Codex. The contributor remains
responsible for reviewing, understanding, and submitting the change
under the repository AI usage policy.

---------

Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-17 14:11:07 +01:00
..



Oxc logo


MIT licensed Build Status Code Coverage

Discord chat Playground

⚓ Oxc

The Oxidation Compiler is creating a suite of high-performance tools for JavaScript and TypeScript.

Oxlint

This is the linter for oxc.

See usage instructions.

Run

  • npx --yes oxlint@latest in your JavaScript / TypeScript codebase and see it complete in milliseconds. No configurations are required.
  • npx oxlint@latest --help for quick usage instructions.
  • npx oxlint@latest --rules for the list of rules.
  • npx skills add https://github.com/oxc-project/oxc --skill migrate-oxlint to install the migrate-oxlint skill, then run /migrate-oxlint to migrate from ESLint.
  • See also migrate from ESLint.