Skip to content

Conversation

@connorshea
Copy link
Contributor

Part of #14743.

  • react/only-export-components
  • react/jsx-no-target-blank
  • jsx-a11y/mouse-events-have-key-events
  • eslint/prefer-destructuring

Generated docs:

## Configuration

This rule accepts a configuration object with the following properties:

### AssignmentExpression

type: `object`

default: `{"array":true, "object":true}`

Configuration for destructuring in assignment expressions, configured for arrays and objects independently.


#### AssignmentExpression.array

type: `boolean`

default: `true`




#### AssignmentExpression.object

type: `boolean`

default: `true`




### VariableDeclarator

type: `object`

default: `{"array":true, "object":true}`

Configuration for destructuring in variable declarations, configured for arrays and objects independently.


#### VariableDeclarator.array

type: `boolean`

default: `true`




#### VariableDeclarator.object

type: `boolean`

default: `true`




### enforceForRenamedProperties

type: `boolean`

default: `false`

Determines whether the object destructuring rule applies to renamed variables.
## Configuration

This rule accepts a configuration object with the following properties:

### hoverInHandlers

type: `string[]`

default: `["onMouseOver"]`

List of hover-in mouse event handlers that require corresponding keyboard event handlers.


### hoverOutHandlers

type: `string[]`

default: `["onMouseOut"]`

List of hover-out mouse event handlers that require corresponding keyboard event handlers.
## Configuration

This rule accepts a configuration object with the following properties:

### allowReferrer

type: `boolean`

default: `false`

Whether to allow referrers.


### enforceDynamicLinks

type: `"always" | "never"`

default: `"always"`

Whether to enforce dynamic links or enforce static links.


### forms

type: `boolean`

default: `false`

Whether to check form elements.


### links

type: `boolean`

default: `true`

Whether to check link elements.


### warnOnSpreadAttributes

type: `boolean`

default: `false`

Whether to warn when spread attributes are used.
## Configuration

This rule accepts a configuration object with the following properties:

### allowConstantExport

type: `[
  boolean,
  null
]`

default: `null`

Allow exporting primitive constants (string/number/boolean/template literal)
alongside component exports without triggering a violation. Recommended when your
bundler’s Fast Refresh integration supports this (enabled by the plugin’s `vite`
preset).

\```jsx
// Allowed when allowConstantExport: true
export const VERSION = "3";
export const Foo = () => null;
\```


### allowExportNames

type: `string[]`

default: `null`

Treat specific named exports as HMR-safe (useful for frameworks that hot-replace
certain exports). For example, in Remix:
`{ "allowExportNames": ["meta", "links", "headers", "loader", "action"] }`


### checkJS

type: `[
  boolean,
  null
]`

default: `null`

Check `.js` files that contain JSX (in addition to `.tsx`/`.jsx`). To reduce
false positives, only files that import React are checked when this is enabled.


### customHOCs

type: `string[]`

default: `null`

If you export components wrapped in custom higher-order components, list their
identifiers here to avoid false positives.

Copilot AI review requested due to automatic review settings October 31, 2025 19:50
@connorshea connorshea requested a review from camc314 as a code owner October 31, 2025 19:50
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 31, 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 Oct 31, 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 JSON schema support and documentation for configuration options across multiple linter rules by migrating from manual documentation in doc comments to structured schema-based configuration.

  • Adds JsonSchema, Deserialize, and Serialize derives to configuration structs
  • Moves configuration documentation from rule doc comments to struct field doc comments
  • Updates declare_oxc_lint! macros to specify config types

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
crates/oxc_linter/src/rules/react/only_export_components.rs Adds schema support to OnlyExportComponentsOptionsJson, documents config fields, removes manual option docs
crates/oxc_linter/src/rules/react/jsx_no_target_blank.rs Adds schema support to JsxNoTargetBlank and EnforceDynamicLinksEnum, documents config fields
crates/oxc_linter/src/rules/jsx_a11y/mouse_events_have_key_events.rs Adds schema support to MouseEventsHaveKeyEventsConfig, documents config fields, fixes doc comment typos
crates/oxc_linter/src/rules/eslint/prefer_destructuring.rs Adds schema support to PreferDestructuring and Config, documents config fields, removes manual option docs

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

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 31, 2025

CodSpeed Performance Report

Merging #15196 will not alter performance

Comparing connorshea:docs-bundle-3 (df310eb) with main (1b9f6fc)1

Summary

✅ 4 untouched
⏩ 33 skipped2

Footnotes

  1. No successful run was found on main (baaeca8) during the generation of this report, so 1b9f6fc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 33 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 merged commit 51c8724 into oxc-project:main Nov 1, 2025
21 checks passed
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