Skip to content

feat: add skills and docs for writing new rules#495

Merged
rayhanadev merged 6 commits into
mainfrom
ray/add-rule-writing-guide
May 27, 2026
Merged

feat: add skills and docs for writing new rules#495
rayhanadev merged 6 commits into
mainfrom
ray/add-rule-writing-guide

Conversation

@rayhanadev

@rayhanadev rayhanadev commented May 26, 2026

Copy link
Copy Markdown
Member

Why

Documents the process for creating high-quality React Doctor rules.

The guide gives contributors a concrete workflow for moving from rule idea to implementation, evals, PR description, and review follow-up. It uses PR #491 as the reference example for adversarial testing, RDE workflows, detector scoping, and false-positive review.

What changed

  • Added docs/HOW_TO_WRITE_A_RULE.md.
  • Includes a table of contents and end-to-end rule authoring workflow.
  • Documents the two RDE workflows: validating ideas against OSS, and testing implemented rules against OSS.
  • Adds examples for detector precision, adversarial tests, AST vocabulary, review triage, and PR structure.
  • Adds pre-implementation, pre-PR, and pre-merge checklists.

Test plan

Not run. Docs-only change.

Made with Cursor


Note

Low Risk
Documentation-only addition with no changes to lint rules, runtime behavior, or dependencies.

Overview
Adds docs/HOW_TO_WRITE_A_RULE.md, a contributor guide for authoring React Doctor oxlint rules end to end.

The doc walks from defining a one-sentence bug and runtime rationale through research, RDE pre- and post-implementation OSS evals, scoping (syntax / scope- / path-aware detectors), adversarial tests, detector implementation, AST vocabulary, naming and utilities, local verification commands, PR description structure, review triage, checklists, and common failure modes. PR #491 (no-mutating-reducer-state) is the reference example throughout.

No runtime or rule code changes—documentation only.

Reviewed by Cursor Bugbot for commit 928ab91. Bugbot is set up for automated code reviews on this repo. Configure here.


Open in Devin Review

Copilot AI review requested due to automatic review settings May 26, 2026 06:32
@reactreview

reactreview Bot commented May 26, 2026

Copy link
Copy Markdown

No new issues

Reviewed by reactreview for commit 928ab91. Configure here.

This comment was marked as resolved.

@aidenybai

Copy link
Copy Markdown
Member

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 928ab91. Configure here.

rayhanadev and others added 2 commits May 26, 2026 12:38
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@rayhanadev rayhanadev force-pushed the ray/add-rule-writing-guide branch from 96b07cb to adb4ead Compare May 26, 2026 20:11
Co-authored-by: Cursor <cursoragent@cursor.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

rayhanadev and others added 3 commits May 26, 2026 22:50
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@rayhanadev rayhanadev changed the title add rule writing guide feat: add skills and docs for writing new rules May 27, 2026
@rayhanadev rayhanadev merged commit 444fbeb into main May 27, 2026
13 of 14 checks passed
@rayhanadev rayhanadev deleted the ray/add-rule-writing-guide branch May 27, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants