Skip to content

Comments

docs(linter): Add config option docs for various rules.#16024

Merged
graphite-app[bot] merged 1 commit intomainfrom
more-docs
Nov 24, 2025
Merged

docs(linter): Add config option docs for various rules.#16024
graphite-app[bot] merged 1 commit intomainfrom
more-docs

Conversation

@connorshea
Copy link
Member

@connorshea connorshea commented Nov 24, 2025

Part of #14743.

  • typescript/consistent-type-imports
  • eslint/no-else-return
  • react/state-in-constructor
  • eslint/no-cond-assign
  • eslint/default-case
  • react/jsx-handler-names
  • eslint/new-cap

Generated docs:

typescript/consistent-type-imports:

## Configuration

This rule accepts a configuration object with the following properties:

### disallowTypeAnnotations

type: `boolean`

Disallow using `import()` in type annotations, like `type T = import('foo')`


### fixStyle

type: `"separate-type-imports" | "inline-type-imports"`

Control how type imports are added when auto-fixing.


#### `"separate-type-imports"`

Will add the type keyword after the import keyword `import type { A } from '...'`


#### `"inline-type-imports"`

Will inline the type keyword `import { type A } from '...'` (only available in TypeScript 4.5+)


### prefer

type: `"type-imports" | "no-type-imports"`


Control whether to enforce type imports or value imports.


#### `"type-imports"`

Will enforce that you always use `import type Foo from '...'` except referenced by metadata of decorators.


#### `"no-type-imports"`

Will enforce that you always use `import Foo from '...'`

eslint/no-else-return:

## Configuration

This rule accepts a configuration object with the following properties:

### allowElseIf

type: `boolean`

default: `true`

Whether to allow `else if` blocks after a return statement.

Examples of **incorrect** code for this rule with `allowElseIf: false`:
\```javascript
function foo() {
if (error) {
return 'It failed';
} else if (loading) {
return "It's still loading";
}
}
\```

Examples of **correct** code for this rule with `allowElseIf: false`:
\```javascript
function foo() {
if (error) {
return 'It failed';
}

if (loading) {
return "It's still loading";
}
}
\```

react/state-in-constructor:

## Configuration

This rule accepts one of the following string values:

### `"always"`

Enforce state initialization in the constructor.

### `"never"`

Enforce state initialization with a class property.

eslint/no-cond-assign:

## Configuration

This rule accepts one of the following string values:

### `"except-parens"`

Allow assignments in conditional expressions only if they are
enclosed in parentheses.


### `"always"`

Disallow all assignments in conditional expressions.

eslint/default-case:

## Configuration

This rule accepts a configuration object with the following properties:

### commentPattern

type: `[
  string,
  null
]`

A regex pattern used to detect comments that mark the absence
of a `default` case as intentional.

Default value: `no default`.

Examples of **incorrect** code for this rule with the `{ "commentPattern": "^skip\\sdefault" }` option:
\```js
/* default-case: ["error", { "commentPattern": "^skip\sdefault" }] */

switch (a) {
case 1:
break;
// no default
}
\```

Examples of **correct** code for this rule with the `{ "commentPattern": "^skip\\sdefault" }` option:
\```js
/* default-case: ["error", { "commentPattern": "^skip\\sdefault" }] */

switch (a) {
case 1:
break;
// skip default
}
\```

eslint/no-fallthrough:

## Configuration

This rule accepts a configuration object with the following properties:

### allowEmptyCase

type: `boolean`

default: `false`

Whether to allow empty case clauses to fall through.


### commentPattern

type: `[
  string,
  null
]`


Custom regex pattern to match fallthrough comments.


### reportUnusedFallthroughComment

type: `boolean`

default: `false`

Whether to report unused fallthrough comments.

react/jsx-handler-names:

## Configuration

This rule accepts a configuration object with the following properties:

### checkInlineFunctions

type: `boolean`

default: `false`

Whether to check for inline functions in JSX attributes.

### checkLocalVariables

type: `boolean`

default: `false`

Whether to check for local variables in JSX attributes.

### eventHandlerPrefixes

type: `string`

default: `"handle"`

Event handler prefixes to check against.

### eventHandlerPropPrefixes

type: `string`

default: `"on"`

Event handler prop prefixes to check against.

### eventHandlerPropRegex

type: `[
  string,
  null
]`

Compiled regex for event handler prop prefixes.


### eventHandlerRegex

type: `[
  string,
  null
]`

Compiled regex for event handler prefixes.

### ignoreComponentNames

type: `string[]`

default: `[]`

Component names to ignore when checking for event handler prefixes.

eslint/new-cap:

## Configuration

This rule accepts a configuration object with the following properties:

### capIsNew

type: `boolean`

default: `true`

Whether to enforce that functions with names starting with an uppercase letter are only used as constructors.


### capIsNewExceptionPattern

type: `[
  string,
  null
]`


A regex pattern to match exceptions for functions with names starting with an uppercase letter.


### capIsNewExceptions

type: `string[]`

default: `[]`

Exceptions to ignore for functions with names starting with an uppercase letter.


### newIsCap

type: `boolean`

default: `true`

Whether to enforce that constructor names start with an uppercase letter.


### newIsCapExceptionPattern

type: `[
  string,
  null
]`


A regex pattern to match exceptions for constructor names starting with an uppercase letter.


### newIsCapExceptions

type: `string[]`

default: `["Array", "Boolean", "Date", "Error", "Function", "Number", "Object", "RegExp", "String", "Symbol", "BigInt"]`

Exceptions to ignore for constructor names starting with an uppercase letter.


### properties

type: `boolean`

default: `true`

Whether to check member expressions (e.g., `obj.Method()`).

Copilot AI review requested due to automatic review settings November 24, 2025 04:24
@connorshea connorshea requested a review from camc314 as a code owner November 24, 2025 04:24
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 24, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation labels Nov 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configuration option documentation for 7 linter rules, making them accessible through auto-generated schemas. The changes enable users to understand available configuration options directly from the generated documentation.

  • Adds JsonSchema derives and doc comments to configuration structs for better documentation generation
  • Updates error messages to use backticks instead of single quotes for code elements (e.g., `break` instead of 'break')
  • Removes rules from the test exception list now that they have proper configuration documentation

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rule_configuration_documentation_test.rs Removes 7 rules from the exceptions list that now have configuration documentation
eslint_no_fallthrough.snap Updates snapshot to reflect backtick usage in error messages
eslint_no_else_return.snap Updates snapshot to reflect backtick usage in error messages
eslint_default_case.snap Updates snapshot to reflect backtick usage in error messages
consistent_type_imports.rs Adds JsonSchema support, field-level documentation, and registers config with macro
state_in_constructor.rs Adds JsonSchema support, enum variant documentation, and registers config with macro
jsx_handler_names.rs Adds JsonSchema support, field-level documentation, and registers config with macro
no_fallthrough.rs Adds JsonSchema support, refactors config struct, updates error messages to use backticks
no_else_return.rs Adds JsonSchema support, moves diagnostic function, adds comprehensive field documentation with examples
no_cond_assign.rs Adds JsonSchema support, adds enum variant documentation, and registers config with macro
default_case.rs Adds JsonSchema support, adds comprehensive field documentation with examples, updates error messages to use backticks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 24, 2025

CodSpeed Performance Report

Merging #16024 will not alter performance

Comparing more-docs (066489a) with main (3976e4f)

Summary

✅ 4 untouched
⏩ 41 skipped1

Footnotes

  1. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
@camc314 camc314 self-assigned this Nov 24, 2025
Copy link
Contributor

camc314 commented Nov 24, 2025

Merge activity

Part of #14743.

- `typescript/consistent-type-imports`
- `eslint/no-else-return`
- `react/state-in-constructor`
- `eslint/no-cond-assign`
- `eslint/default-case`
- `react/jsx-handler-names`
- `eslint/new-cap`

Generated docs:

typescript/consistent-type-imports:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### disallowTypeAnnotations

type: `boolean`

Disallow using `import()` in type annotations, like `type T = import('foo')`

### fixStyle

type: `"separate-type-imports" | "inline-type-imports"`

Control how type imports are added when auto-fixing.

#### `"separate-type-imports"`

Will add the type keyword after the import keyword `import type { A } from '...'`

#### `"inline-type-imports"`

Will inline the type keyword `import { type A } from '...'` (only available in TypeScript 4.5+)

### prefer

type: `"type-imports" | "no-type-imports"`

Control whether to enforce type imports or value imports.

#### `"type-imports"`

Will enforce that you always use `import type Foo from '...'` except referenced by metadata of decorators.

#### `"no-type-imports"`

Will enforce that you always use `import Foo from '...'`
```

eslint/no-else-return:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### allowElseIf

type: `boolean`

default: `true`

Whether to allow `else if` blocks after a return statement.

Examples of **incorrect** code for this rule with `allowElseIf: false`:
\```javascript
function foo() {
if (error) {
return 'It failed';
} else if (loading) {
return "It's still loading";
}
}
\```

Examples of **correct** code for this rule with `allowElseIf: false`:
\```javascript
function foo() {
if (error) {
return 'It failed';
}

if (loading) {
return "It's still loading";
}
}
\```
```

react/state-in-constructor:

```md
## Configuration

This rule accepts one of the following string values:

### `"always"`

Enforce state initialization in the constructor.

### `"never"`

Enforce state initialization with a class property.
```

eslint/no-cond-assign:

```md
## Configuration

This rule accepts one of the following string values:

### `"except-parens"`

Allow assignments in conditional expressions only if they are
enclosed in parentheses.

### `"always"`

Disallow all assignments in conditional expressions.
```

eslint/default-case:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### commentPattern

type: `[
  string,
  null
]`

A regex pattern used to detect comments that mark the absence
of a `default` case as intentional.

Default value: `no default`.

Examples of **incorrect** code for this rule with the `{ "commentPattern": "^skip\\sdefault" }` option:
\```js
/* default-case: ["error", { "commentPattern": "^skip\sdefault" }] */

switch (a) {
case 1:
break;
// no default
}
\```

Examples of **correct** code for this rule with the `{ "commentPattern": "^skip\\sdefault" }` option:
\```js
/* default-case: ["error", { "commentPattern": "^skip\\sdefault" }] */

switch (a) {
case 1:
break;
// skip default
}
\```
```

eslint/no-fallthrough:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### allowEmptyCase

type: `boolean`

default: `false`

Whether to allow empty case clauses to fall through.

### commentPattern

type: `[
  string,
  null
]`

Custom regex pattern to match fallthrough comments.

### reportUnusedFallthroughComment

type: `boolean`

default: `false`

Whether to report unused fallthrough comments.
```

react/jsx-handler-names:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### checkInlineFunctions

type: `boolean`

default: `false`

Whether to check for inline functions in JSX attributes.

### checkLocalVariables

type: `boolean`

default: `false`

Whether to check for local variables in JSX attributes.

### eventHandlerPrefixes

type: `string`

default: `"handle"`

Event handler prefixes to check against.

### eventHandlerPropPrefixes

type: `string`

default: `"on"`

Event handler prop prefixes to check against.

### eventHandlerPropRegex

type: `[
  string,
  null
]`

Compiled regex for event handler prop prefixes.

### eventHandlerRegex

type: `[
  string,
  null
]`

Compiled regex for event handler prefixes.

### ignoreComponentNames

type: `string[]`

default: `[]`

Component names to ignore when checking for event handler prefixes.
```

eslint/new-cap:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### capIsNew

type: `boolean`

default: `true`

Whether to enforce that functions with names starting with an uppercase letter are only used as constructors.

### capIsNewExceptionPattern

type: `[
  string,
  null
]`

A regex pattern to match exceptions for functions with names starting with an uppercase letter.

### capIsNewExceptions

type: `string[]`

default: `[]`

Exceptions to ignore for functions with names starting with an uppercase letter.

### newIsCap

type: `boolean`

default: `true`

Whether to enforce that constructor names start with an uppercase letter.

### newIsCapExceptionPattern

type: `[
  string,
  null
]`

A regex pattern to match exceptions for constructor names starting with an uppercase letter.

### newIsCapExceptions

type: `string[]`

default: `["Array", "Boolean", "Date", "Error", "Function", "Number", "Object", "RegExp", "String", "Symbol", "BigInt"]`

Exceptions to ignore for constructor names starting with an uppercase letter.

### properties

type: `boolean`

default: `true`

Whether to check member expressions (e.g., `obj.Method()`).
```
@graphite-app graphite-app bot merged commit ceffa5a into main Nov 24, 2025
20 checks passed
@graphite-app graphite-app bot deleted the more-docs branch November 24, 2025 09:19
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
overlookmotel added a commit that referenced this pull request Nov 24, 2025
# Oxlint
### 💥 BREAKING CHANGES

- cbb27fd ast: [**BREAKING**] Add `TSGlobalDeclaration` type (#15712)
(overlookmotel)

### 🚀 Features

- 72660f7 linter: Support auto generate config document for tuple lint
option (#15904) (Duc Nghiem Xuan)
- 0c1f82b linter/plugins: Add `tokens` property to `Program` (#16020)
(overlookmotel)
- 9e61beb linter/plugins: Implement `SourceCode#getFirstToken()`
(#16002) (Arsh)
- 9a548dd linter/plugins: Implement `SourceCode#getLastTokens()`
(#16000) (Arsh)
- 0b6cb11 linter/plugins: Implement `SourceCode#getFirstTokens()`
(#15976) (Arsh)
- 166781e linter/plugins: Implement `SourceCode#getTokenAfter()`
(#15973) (Arsh)
- 6ae232b linter: Expose type errors via tsgolint (#15917) (camc314)
- 2bfdd26 linter/plugins: Implement `SourceCode#getTokensAfter()`
(#15971) (Arsh)
- 45fffc1 linter/plugins: Implement `SourceCode#getTokenBefore()`
(#15956) (Arsh)
- 776e473 linter/plugins: Implement `SourceCode#getTokensBefore()`
(#15955) (Arsh)
- 595867a oxlint: Generate markdownDescription fields for oxlint JSON
schema. (#15959) (connorshea)
- 5569317 vscode: Add quick actions to status bar tooltip (#15962)
(Sysix)
- 986cac1 linter/plugins: Token-related `SourceCode` APIs (TS ESLint
implementation) (#15861) (Arsh)
- a21f9e4 linter: Implement unicorn/prefer-bigint-literals rule (#15923)
(Michiel Vrins)
- 4b9d8d2 linter/type-aware: Include range with tsconfig diagnostics
(#15916) (camc314)
- 220d01e editor: Improve the status bar item for the VS Code extension
by adding a tooltip. (#15819) (connorshea)

### 🐛 Bug Fixes

- 2bd3cb6 apps, editors, napi: Fix `oxlint-disable` comments (#16014)
(overlookmotel)
- 81f5360 linter/prefer-number-properties: Get fixer to replace entire
call expr (#15979) (camc314)
- e4ba07f language_server: Always write to memory file system (#15975)
(Sysix)
- a8a2032 linter: Support missing `range` for internal diagnostics
(#15964) (camc314)
- 619a226 oxlint/lsp: Don't register `textDocument/formatting`
capability (#15882) (Sysix)
- 6ab1a20 linter: Fix no_useless_spread producing invalid syntax when
removing empty object spreads (#15905) (camc314)
- be4b6df linter: Unicorn/prefer-string-replace-all incorrectly escapes
backslashes (#15901) (camc314)
- 9fa9ef2 linter: Gracefully fail when using import plugin, large file
counf and JS plugins (#15864) (camc314)
- c027398 linter/plugins: Correct bindings package names glob in TSDown
config (#15871) (overlookmotel)
- b622ef8 linter: Fix `oxc/bad_array_method_on_arguments` rule behavior.
(#15854) (connorshea)
- aa06c3f linter: Recognize NewExpression as value context in
no-unused-private-class-members (#15843) (camc314)
- e89c5ba typescript/prefer-namespace-keyword: Skip nested
`TSModuleDeclaration`s (#15806) (overlookmotel)
- 646d020 linter/exhaustive-dependencies: Prevent is_callee_of_call_expr
flag from leaking into nested expressions (#15832) (camc314)
- 46bd6bd linter/plugins: Pin `@typescript-eslint/scope-manager`
dependency (#15807) (overlookmotel)
- fba31fa linter: Patch `@typescript-eslint/scope manager` (#15214)
(Arsh)
- 50307c1 linter/jest: Ignore `expect` identifier in argument position
(#15785) (camc314)

### ⚡ Performance

- 024b48a linter/plugins: Lazy-load tokens parsing code (#16011)
(overlookmotel)
- 15365c9 linter/plugins: Reduce var assignments (#15953)
(overlookmotel)
- 84d1f4f linter/plugins: Downgrade some checks to debug-only (#15922)
(overlookmotel)
- a49f704 linter/typescript: Avoid searching source text unless required
(#15805) (overlookmotel)

### 📚 Documentation

- ceffa5a linter: Add config option docs for various rules. (#16024)
(connorshea)
- 9a0ed13 linter: Fix config option docs for eslint/operator-assignment
rule. (#16030) (connorshea)
- 0b18005 linter: Add config docs generation for rules with Regex
arguments (#15978) (connorshea)
- 48d18e0 linter: Improve diagnostic message for promise/catch-or-return
rule (#15980) (connorshea)
- 6c72e84 linter: Use backticks for code elements across more rule
diagnostics (#15958) (connorshea)
- a63dad7 linter/plugins: Add comment (#15952) (overlookmotel)
- 81ea642 vscode: Use markdownDescription for better formatting in
VSCode Settings (#15889) (connorshea)
- db6a110 linter/plugins: Fix JSDoc comment (#15884) (overlookmotel)
- 1487271 linter: Add config option docs for `jsdoc/require-param` and
`jsdoc/require-returns` rules (#15857) (connorshea)
- fbf0fd4 linter/plugins: Add JSDoc comments to `Plugin` and `Rule`
types (#15815) (overlookmotel)
- ac5e4b5 linter/plugins: Add JSDoc comments and improve comments
(#15814) (overlookmotel)
- 9b7b083 linter: Fix error in `curly` `"all"` example (#15801)
(camc314)
- 65a3520 linter: Improve diagnostic for consistent-type-definitions
rule. (#15752) (connorshea)

### 🛡️ Security

- f9b9276 deps: Update dependency rolldown to v1.0.0-beta.51 (#15856)
(renovate[bot])
# Oxfmt
### 💥 BREAKING CHANGES

- a937890 formatter: [**BREAKING**] Default to `lineWidth: 100` (#15933)
(leaysgur)
- 03d5f5a formatter/sort-imports: [**BREAKING**] Change default order to
`natural` with `natord` crate (#15828) (leaysgur)
- cbb27fd ast: [**BREAKING**] Add `TSGlobalDeclaration` type (#15712)
(overlookmotel)

### 🚀 Features

- 7818e22 formatter/sort-imports: Support `options.groups` (#15831)
(leaysgur)
- f9a502c oxfmt: `oxfmt --lsp` support (#15765) (leaysgur)

### 🐛 Bug Fixes

- 4817486 formatter: Revert `FormatElement::BestFitting` printing logic
(#16028) (Dunqing)
- 5562dd6 formatter: Incorrect formatting method chain with trailing
comments (#16027) (Dunqing)
- 6d14c8b formatter: Comments in export class decorators are printing
incorrectly (#15897) (Dunqing)
- 683c764 formatter: Correct a few minor mismatched typescript tests
(#15894) (Dunqing)
- c11cc07 formatter: Improve formatting for default type on type
parameters (#15893) (Dunqing)
- 0bff596 formatter: Handle JSX expresssion dangling comment (#15890)
(leaysgur)
- 16a9dc8 formatter: Inconsistent printing of class extends and
interface extends (#15892) (Dunqing)
- 300b496 formatter: Inconsistent CallExpression and NewExpression
around member chain and logical expression (#15858) (Dunqing)

### ⚡ Performance

- 65174cc formatter: Reduce the size of `TextWidth` to 4 byte (#15827)
(Dunqing)
- 4fe3aac formatter: Use `ArenaVec` and `ArenaBox` (#15420) (Dunqing)

Co-authored-by: overlookmotel <557937+overlookmotel@users.noreply.github.com>
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…16024)

Part of oxc-project#14743.

- `typescript/consistent-type-imports`
- `eslint/no-else-return`
- `react/state-in-constructor`
- `eslint/no-cond-assign`
- `eslint/default-case`
- `react/jsx-handler-names`
- `eslint/new-cap`

Generated docs:

typescript/consistent-type-imports:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### disallowTypeAnnotations

type: `boolean`

Disallow using `import()` in type annotations, like `type T = import('foo')`

### fixStyle

type: `"separate-type-imports" | "inline-type-imports"`

Control how type imports are added when auto-fixing.

#### `"separate-type-imports"`

Will add the type keyword after the import keyword `import type { A } from '...'`

#### `"inline-type-imports"`

Will inline the type keyword `import { type A } from '...'` (only available in TypeScript 4.5+)

### prefer

type: `"type-imports" | "no-type-imports"`

Control whether to enforce type imports or value imports.

#### `"type-imports"`

Will enforce that you always use `import type Foo from '...'` except referenced by metadata of decorators.

#### `"no-type-imports"`

Will enforce that you always use `import Foo from '...'`
```

eslint/no-else-return:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### allowElseIf

type: `boolean`

default: `true`

Whether to allow `else if` blocks after a return statement.

Examples of **incorrect** code for this rule with `allowElseIf: false`:
\```javascript
function foo() {
if (error) {
return 'It failed';
} else if (loading) {
return "It's still loading";
}
}
\```

Examples of **correct** code for this rule with `allowElseIf: false`:
\```javascript
function foo() {
if (error) {
return 'It failed';
}

if (loading) {
return "It's still loading";
}
}
\```
```

react/state-in-constructor:

```md
## Configuration

This rule accepts one of the following string values:

### `"always"`

Enforce state initialization in the constructor.

### `"never"`

Enforce state initialization with a class property.
```

eslint/no-cond-assign:

```md
## Configuration

This rule accepts one of the following string values:

### `"except-parens"`

Allow assignments in conditional expressions only if they are
enclosed in parentheses.

### `"always"`

Disallow all assignments in conditional expressions.
```

eslint/default-case:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### commentPattern

type: `[
  string,
  null
]`

A regex pattern used to detect comments that mark the absence
of a `default` case as intentional.

Default value: `no default`.

Examples of **incorrect** code for this rule with the `{ "commentPattern": "^skip\\sdefault" }` option:
\```js
/* default-case: ["error", { "commentPattern": "^skip\sdefault" }] */

switch (a) {
case 1:
break;
// no default
}
\```

Examples of **correct** code for this rule with the `{ "commentPattern": "^skip\\sdefault" }` option:
\```js
/* default-case: ["error", { "commentPattern": "^skip\\sdefault" }] */

switch (a) {
case 1:
break;
// skip default
}
\```
```

eslint/no-fallthrough:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### allowEmptyCase

type: `boolean`

default: `false`

Whether to allow empty case clauses to fall through.

### commentPattern

type: `[
  string,
  null
]`

Custom regex pattern to match fallthrough comments.

### reportUnusedFallthroughComment

type: `boolean`

default: `false`

Whether to report unused fallthrough comments.
```

react/jsx-handler-names:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### checkInlineFunctions

type: `boolean`

default: `false`

Whether to check for inline functions in JSX attributes.

### checkLocalVariables

type: `boolean`

default: `false`

Whether to check for local variables in JSX attributes.

### eventHandlerPrefixes

type: `string`

default: `"handle"`

Event handler prefixes to check against.

### eventHandlerPropPrefixes

type: `string`

default: `"on"`

Event handler prop prefixes to check against.

### eventHandlerPropRegex

type: `[
  string,
  null
]`

Compiled regex for event handler prop prefixes.

### eventHandlerRegex

type: `[
  string,
  null
]`

Compiled regex for event handler prefixes.

### ignoreComponentNames

type: `string[]`

default: `[]`

Component names to ignore when checking for event handler prefixes.
```

eslint/new-cap:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### capIsNew

type: `boolean`

default: `true`

Whether to enforce that functions with names starting with an uppercase letter are only used as constructors.

### capIsNewExceptionPattern

type: `[
  string,
  null
]`

A regex pattern to match exceptions for functions with names starting with an uppercase letter.

### capIsNewExceptions

type: `string[]`

default: `[]`

Exceptions to ignore for functions with names starting with an uppercase letter.

### newIsCap

type: `boolean`

default: `true`

Whether to enforce that constructor names start with an uppercase letter.

### newIsCapExceptionPattern

type: `[
  string,
  null
]`

A regex pattern to match exceptions for constructor names starting with an uppercase letter.

### newIsCapExceptions

type: `string[]`

default: `["Array", "Boolean", "Date", "Error", "Function", "Number", "Object", "RegExp", "String", "Symbol", "BigInt"]`

Exceptions to ignore for constructor names starting with an uppercase letter.

### properties

type: `boolean`

default: `true`

Whether to check member expressions (e.g., `obj.Method()`).
```
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
# Oxlint
### 💥 BREAKING CHANGES

- cbb27fd ast: [**BREAKING**] Add `TSGlobalDeclaration` type (oxc-project#15712)
(overlookmotel)

### 🚀 Features

- 72660f7 linter: Support auto generate config document for tuple lint
option (oxc-project#15904) (Duc Nghiem Xuan)
- 0c1f82b linter/plugins: Add `tokens` property to `Program` (oxc-project#16020)
(overlookmotel)
- 9e61beb linter/plugins: Implement `SourceCode#getFirstToken()`
(oxc-project#16002) (Arsh)
- 9a548dd linter/plugins: Implement `SourceCode#getLastTokens()`
(oxc-project#16000) (Arsh)
- 0b6cb11 linter/plugins: Implement `SourceCode#getFirstTokens()`
(oxc-project#15976) (Arsh)
- 166781e linter/plugins: Implement `SourceCode#getTokenAfter()`
(oxc-project#15973) (Arsh)
- 6ae232b linter: Expose type errors via tsgolint (oxc-project#15917) (camc314)
- 2bfdd26 linter/plugins: Implement `SourceCode#getTokensAfter()`
(oxc-project#15971) (Arsh)
- 45fffc1 linter/plugins: Implement `SourceCode#getTokenBefore()`
(oxc-project#15956) (Arsh)
- 776e473 linter/plugins: Implement `SourceCode#getTokensBefore()`
(oxc-project#15955) (Arsh)
- 595867a oxlint: Generate markdownDescription fields for oxlint JSON
schema. (oxc-project#15959) (connorshea)
- 5569317 vscode: Add quick actions to status bar tooltip (oxc-project#15962)
(Sysix)
- 986cac1 linter/plugins: Token-related `SourceCode` APIs (TS ESLint
implementation) (oxc-project#15861) (Arsh)
- a21f9e4 linter: Implement unicorn/prefer-bigint-literals rule (oxc-project#15923)
(Michiel Vrins)
- 4b9d8d2 linter/type-aware: Include range with tsconfig diagnostics
(oxc-project#15916) (camc314)
- 220d01e editor: Improve the status bar item for the VS Code extension
by adding a tooltip. (oxc-project#15819) (connorshea)

### 🐛 Bug Fixes

- 2bd3cb6 apps, editors, napi: Fix `oxlint-disable` comments (oxc-project#16014)
(overlookmotel)
- 81f5360 linter/prefer-number-properties: Get fixer to replace entire
call expr (oxc-project#15979) (camc314)
- e4ba07f language_server: Always write to memory file system (oxc-project#15975)
(Sysix)
- a8a2032 linter: Support missing `range` for internal diagnostics
(oxc-project#15964) (camc314)
- 619a226 oxlint/lsp: Don't register `textDocument/formatting`
capability (oxc-project#15882) (Sysix)
- 6ab1a20 linter: Fix no_useless_spread producing invalid syntax when
removing empty object spreads (oxc-project#15905) (camc314)
- be4b6df linter: Unicorn/prefer-string-replace-all incorrectly escapes
backslashes (oxc-project#15901) (camc314)
- 9fa9ef2 linter: Gracefully fail when using import plugin, large file
counf and JS plugins (oxc-project#15864) (camc314)
- c027398 linter/plugins: Correct bindings package names glob in TSDown
config (oxc-project#15871) (overlookmotel)
- b622ef8 linter: Fix `oxc/bad_array_method_on_arguments` rule behavior.
(oxc-project#15854) (connorshea)
- aa06c3f linter: Recognize NewExpression as value context in
no-unused-private-class-members (oxc-project#15843) (camc314)
- e89c5ba typescript/prefer-namespace-keyword: Skip nested
`TSModuleDeclaration`s (oxc-project#15806) (overlookmotel)
- 646d020 linter/exhaustive-dependencies: Prevent is_callee_of_call_expr
flag from leaking into nested expressions (oxc-project#15832) (camc314)
- 46bd6bd linter/plugins: Pin `@typescript-eslint/scope-manager`
dependency (oxc-project#15807) (overlookmotel)
- fba31fa linter: Patch `@typescript-eslint/scope manager` (oxc-project#15214)
(Arsh)
- 50307c1 linter/jest: Ignore `expect` identifier in argument position
(oxc-project#15785) (camc314)

### ⚡ Performance

- 024b48a linter/plugins: Lazy-load tokens parsing code (oxc-project#16011)
(overlookmotel)
- 15365c9 linter/plugins: Reduce var assignments (oxc-project#15953)
(overlookmotel)
- 84d1f4f linter/plugins: Downgrade some checks to debug-only (oxc-project#15922)
(overlookmotel)
- a49f704 linter/typescript: Avoid searching source text unless required
(oxc-project#15805) (overlookmotel)

### 📚 Documentation

- ceffa5a linter: Add config option docs for various rules. (oxc-project#16024)
(connorshea)
- 9a0ed13 linter: Fix config option docs for eslint/operator-assignment
rule. (oxc-project#16030) (connorshea)
- 0b18005 linter: Add config docs generation for rules with Regex
arguments (oxc-project#15978) (connorshea)
- 48d18e0 linter: Improve diagnostic message for promise/catch-or-return
rule (oxc-project#15980) (connorshea)
- 6c72e84 linter: Use backticks for code elements across more rule
diagnostics (oxc-project#15958) (connorshea)
- a63dad7 linter/plugins: Add comment (oxc-project#15952) (overlookmotel)
- 81ea642 vscode: Use markdownDescription for better formatting in
VSCode Settings (oxc-project#15889) (connorshea)
- db6a110 linter/plugins: Fix JSDoc comment (oxc-project#15884) (overlookmotel)
- 1487271 linter: Add config option docs for `jsdoc/require-param` and
`jsdoc/require-returns` rules (oxc-project#15857) (connorshea)
- fbf0fd4 linter/plugins: Add JSDoc comments to `Plugin` and `Rule`
types (oxc-project#15815) (overlookmotel)
- ac5e4b5 linter/plugins: Add JSDoc comments and improve comments
(oxc-project#15814) (overlookmotel)
- 9b7b083 linter: Fix error in `curly` `"all"` example (oxc-project#15801)
(camc314)
- 65a3520 linter: Improve diagnostic for consistent-type-definitions
rule. (oxc-project#15752) (connorshea)

### 🛡️ Security

- f9b9276 deps: Update dependency rolldown to v1.0.0-beta.51 (oxc-project#15856)
(renovate[bot])
# Oxfmt
### 💥 BREAKING CHANGES

- a937890 formatter: [**BREAKING**] Default to `lineWidth: 100` (oxc-project#15933)
(leaysgur)
- 03d5f5a formatter/sort-imports: [**BREAKING**] Change default order to
`natural` with `natord` crate (oxc-project#15828) (leaysgur)
- cbb27fd ast: [**BREAKING**] Add `TSGlobalDeclaration` type (oxc-project#15712)
(overlookmotel)

### 🚀 Features

- 7818e22 formatter/sort-imports: Support `options.groups` (oxc-project#15831)
(leaysgur)
- f9a502c oxfmt: `oxfmt --lsp` support (oxc-project#15765) (leaysgur)

### 🐛 Bug Fixes

- 4817486 formatter: Revert `FormatElement::BestFitting` printing logic
(oxc-project#16028) (Dunqing)
- 5562dd6 formatter: Incorrect formatting method chain with trailing
comments (oxc-project#16027) (Dunqing)
- 6d14c8b formatter: Comments in export class decorators are printing
incorrectly (oxc-project#15897) (Dunqing)
- 683c764 formatter: Correct a few minor mismatched typescript tests
(oxc-project#15894) (Dunqing)
- c11cc07 formatter: Improve formatting for default type on type
parameters (oxc-project#15893) (Dunqing)
- 0bff596 formatter: Handle JSX expresssion dangling comment (oxc-project#15890)
(leaysgur)
- 16a9dc8 formatter: Inconsistent printing of class extends and
interface extends (oxc-project#15892) (Dunqing)
- 300b496 formatter: Inconsistent CallExpression and NewExpression
around member chain and logical expression (oxc-project#15858) (Dunqing)

### ⚡ Performance

- 65174cc formatter: Reduce the size of `TextWidth` to 4 byte (oxc-project#15827)
(Dunqing)
- 4fe3aac formatter: Use `ArenaVec` and `ArenaBox` (oxc-project#15420) (Dunqing)

Co-authored-by: overlookmotel <557937+overlookmotel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants