Skip to content

docs(linter/curly): fix incorrect examples code#20421

Merged
camc314 merged 3 commits intooxc-project:mainfrom
kuainx:patch-1
Mar 16, 2026
Merged

docs(linter/curly): fix incorrect examples code#20421
camc314 merged 3 commits intooxc-project:mainfrom
kuainx:patch-1

Conversation

@kuainx
Copy link
Copy Markdown
Contributor

@kuainx kuainx commented Mar 16, 2026

The original "incorrect code" might be correct. I replace them with the incorrect one.

Signed-off-by: KUAI <ekuai@foxmail.com>
@kuainx kuainx requested a review from camc314 as a code owner March 16, 2026 08:48
@github-actions github-actions bot added the A-linter Area - Linter label Mar 16, 2026
@kuainx kuainx changed the title docs: fix wrong examples in curly docs(oxlint): fix wrong examples in curly Mar 16, 2026
@github-actions github-actions bot added the C-docs Category - Documentation. Related to user-facing or internal documentation label Mar 16, 2026
@camc314 camc314 requested a review from Copilot March 16, 2026 16:08
@camc314 camc314 changed the title docs(oxlint): fix wrong examples in curly docs(linter/curly): fix incorrect examples code Mar 16, 2026
@camc314 camc314 self-assigned this Mar 16, 2026
Copy link
Copy Markdown
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

Updates the curly rule documentation examples to ensure the “incorrect” snippets actually violate the configured option behavior, improving the accuracy of the rule docs within oxc_linter.

Changes:

  • Adjusted "multi" option “incorrect” examples to show unnecessary braces being flagged.
  • Adjusted "multi-line" option “incorrect” examples to demonstrate multi-line bodies without braces.
  • Adjusted "multi-or-nest" option “incorrect” examples to better reflect nested/multi-line cases.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Cameron <cameron.clark@hey.com>
Copy link
Copy Markdown
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

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

thank you!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 16, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 52 skipped benchmarks1


Comparing kuainx:patch-1 (4040951) with main (1e2c270)2

Open in CodSpeed

Footnotes

  1. 52 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.

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

@camc314 camc314 merged commit 5c104ff into oxc-project:main Mar 16, 2026
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.

3 participants