Skip to content

Conversation

@connorshea
Copy link
Collaborator

So it'll now get picked up by the auto-generated documentation. Part of #14743.

Generated docs:

## Configuration

This rule accepts a configuration object with the following properties:

### enforceForIndexOf

type: `boolean`

default: `false`

Whether to disallow NaN as arguments of `indexOf` and `lastIndexOf`


### enforceForSwitchCase

type: `boolean`

default: `true`

Whether to disallow NaN in switch cases and discriminants

So it'll now get picked up by the auto-generated documentation.
@connorshea connorshea requested a review from camc314 as a code owner October 21, 2025 04:00
Copilot AI review requested due to automatic review settings October 21, 2025 04:00
@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.

@github-actions github-actions bot added the A-linter Area - Linter label Oct 21, 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 exposes configuration options for the use-isnan linter rule by adding JsonSchema derivation and serde annotations, enabling auto-generated documentation for the rule's enforceForSwitchCase and enforceForIndexOf configuration options.

Key Changes:

  • Added JsonSchema derive macro to the UseIsnan struct
  • Added serde rename_all annotation for camelCase config keys
  • Registered the config struct with the linter macro

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

@github-actions github-actions bot added the C-docs Category - Documentation. Related to user-facing or internal documentation label Oct 21, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 21, 2025

CodSpeed Performance Report

Merging #14844 will not alter performance

Comparing connorshea:use-isnan-docs (720ea6e) with main (d0faa7c)1

Summary

✅ 4 untouched
⏩ 33 skipped2

Footnotes

  1. No successful run was found on main (302c20c) during the generation of this report, so d0faa7c 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 a6f720b 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