lint-rule-authoring
Installation
SKILL.md
Lint rule authoring
Research, implement and evaluate a detector against its stated contract. Sources: React Doctor's rule-research, rule-writing, rule-validate, rde-eval, fuzz, benchmark-fp-fn-audit and run-parity skills. The contract, fixtures and labels are in LINT-RULES.md; paired comparison evidence is in BASE-HEAD-PARITY.md. Consuming a scanner's findings on an application change remains code-review scanner triage.
Apply only the routes and checks for the selected job. Read a linked skill's named file from its installed folder when available, or from the linked source. Report an unavailable required reference instead of inventing it. [skill-authoring, DISTRIBUTION.md#composing-skills]
| The job | Read |
|---|---|
| Choose the detector-authoring, audit-only or paired-comparison branch | SKILL.md |
| Define or repair a detector: contract, supported syntax and bindings, adversarial cases, labelled real-code hits, fuzzing and replay; audit FP/FN results without implementing fixes | LINT-RULES.md |
| Compare checker revisions on pinned inputs: paired runs, canonical diagnostic identity, coverage, exit codes, scoped fallback, cache provenance, controlled timing and the Vercel Sandbox example | BASE-HEAD-PARITY.md |
The rules
- Write the contract before the detector. Establish the harmful behavior, valid traps, supported analysis and explicit non-goals through the rule contract. Search for an existing detector or helper first. [React Doctor, rule-research]
- Treat false positives as correctness bugs. Keep uncertain cases quiet and diagnostic claims within proven behavior; use the valid and invalid edge cases before implementation. [React Doctor, rule-research, rule-writing, rule-validate]
- Keep real-code and fuzz evidence reproducible. Label pinned real-code hits, retain confirmed false positives as regressions, and replay fuzz findings from their seeds. [React Doctor, rde-eval, rule-validate, fuzz]
- Compare equivalent completed work. Use the paired-run contract for changed checker output; incomplete coverage is invalid evidence, and timing verdicts require its controlled sequential comparison. [React Doctor, run-parity]
- Keep a benchmark audit read-only. Use the FP/FN audit's labels and independent second pass; implement a confirmed rule fix only when separately requested. [React Doctor, benchmark-fp-fn-audit]