Skip to content

docs(linter): Ensure that the docs render default values for various rules that use enum config options#17192

Merged
graphite-app[bot] merged 1 commit intomainfrom
ensure-enum-default
Dec 21, 2025
Merged

docs(linter): Ensure that the docs render default values for various rules that use enum config options#17192
graphite-app[bot] merged 1 commit intomainfrom
ensure-enum-default

Conversation

@connorshea
Copy link
Member

Without the Serialize flag, the default values for the enum config options that are taken by these rules will not be shown in the docs. This fixes that problem. It also makes a few other minor tweaks.

Fixes #17189.

Copilot AI review requested due to automatic review settings December 20, 2025 23:10
@connorshea connorshea requested a review from camc314 as a code owner December 20, 2025 23:10
@github-actions github-actions bot added A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation labels Dec 20, 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 ensures that default values for enum config options are properly rendered in documentation by adding the Serialize derive trait to various enum types. The changes also include minor code organization improvements and documentation enhancements.

Key Changes

  • Added Serialize derive to enum config types across multiple linter rules to enable default value rendering in documentation
  • Reordered method implementations in no_instanceof_builtins.rs (moving run after from_configuration)
  • Enhanced documentation and comments in several files

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crates/oxc_linter/src/rules/unicorn/no_instanceof_builtins.rs Added Serialize to Strategy enum; reordered run and from_configuration methods
crates/oxc_linter/src/rules/typescript/no_empty_object_type.rs Added Serialize to AllowInterfaces and AllowObjectTypes enums
crates/oxc_linter/src/rules/typescript/consistent_type_imports.rs Added Serialize to FixStyle and Prefer enums
crates/oxc_linter/src/rules/react/jsx_props_no_spreading.rs Added Serialize to IgnoreEnforceOption enum; changed serde rename from camelCase to kebab-case
crates/oxc_linter/src/rules/eslint/sort_imports.rs Added Serialize to MemberSyntaxSortOrder and ImportKind; added #[schemars(transparent)]; improved documentation and comments
crates/oxc_linter/src/rules/eslint/max_depth.rs Added #[serde(rename_all = "camelCase", default)] attribute
crates/oxc_linter/src/rules/eslint/id_length.rs Added Serialize to PropertyKind enum; removed #[schemars(with = "Vec<String>")] attribute

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

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 20, 2025

CodSpeed Performance Report

Merging #17192 will not alter performance

Comparing ensure-enum-default (7405940) with main (0f63e75)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

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

  2. 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 self-assigned this Dec 21, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 21, 2025
Copy link
Contributor

camc314 commented Dec 21, 2025

Merge activity

…rules that use enum config options (#17192)

Without the `Serialize` flag, the default values for the enum config options that are taken by these rules will not be shown in the docs. This fixes that problem. It also makes a few other minor tweaks.

Fixes #17189.
@graphite-app graphite-app bot force-pushed the ensure-enum-default branch from 7405940 to e14db66 Compare December 21, 2025 14:10
@graphite-app graphite-app bot merged commit e14db66 into main Dec 21, 2025
20 checks passed
@graphite-app graphite-app bot deleted the ensure-enum-default branch December 21, 2025 14:15
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 21, 2025
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.

linter: Documentation for enum config option does not render default value

3 participants