Skip to content

Conversation

@connorshea
Copy link
Contributor

Part of #14743. This will allow us to auto-gen docs for the config rule when building the website.

I believe the note about the rust regex syntax is correct, I based it on the similar comment from the new-cap rule.

Generated docs:

## Configuration

This rule accepts a configuration object with the following properties:

### ignorePropertyModificationsFor

type: `string[]`

default: `[]`

An array of parameter names whose property modifications should be ignored.


### ignorePropertyModificationsForRegex

type: `string[]`


An array of regex patterns (as strings) for parameter names whose property modifications should be ignored.
Note that this uses [Rust regex syntax](https://docs.rs/regex/latest/regex/) and so may not have all features
available to JavaScript regexes.


### props

type: `boolean`

default: `false`

When true, also check for modifications to properties of parameters.

Note 100% sure why there's no default for the regex option, though.

This will allow us to auto-gen docs for the config rule when building the website.

I believe the note about the rust regex syntax is correct, I based it on the similar comment from the new-cap rule.
Copilot AI review requested due to automatic review settings October 21, 2025 05:25
@connorshea connorshea requested a review from camc314 as a code owner October 21, 2025 05:25
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 21, 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.

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

Adds configuration documentation for the no-param-reassign linter rule by implementing the JsonSchema trait and adding doc comments to configuration fields. This enables auto-generation of documentation for the rule's configuration options when building the website.

  • Added JsonSchema derive and schema attributes to NoParamReassignConfig
  • Added doc comments describing each configuration option
  • Linked the config struct to the rule declaration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation labels Oct 21, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 21, 2025

CodSpeed Performance Report

Merging #14849 will not alter performance

Comparing connorshea:no-param-reassign-docs (ff2a6e6) with main (aa024d9)

Summary

✅ 4 untouched
⏩ 33 skipped1

Footnotes

  1. 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 7dc609b into oxc-project:main Oct 21, 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