Conversation
- Generalise asyncReview to fileSuffixes []string (drop single fileSuffix shorthand) so a reviewer can gate on multiple extensions. - Add valuable-comments-ts: the async comment reviewer for .ts/.tsx, with a TypeScript-tailored rubric (types/zod/react-hook-form/JSDoc idioms). - Add react-named-hooks: deterministic advisory flagging React.useXxx() calls and suggesting named hook imports. - Rename containsGoComment -> containsLineComment (language-agnostic). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Brookke
commented
Jul 17, 2026
| ) | ||
|
|
||
| func init() { | ||
| Register("react-named-hooks", handleReactNamedHooks) |
Author
There was a problem hiding this comment.
tbh wondering if this should really be an eslint rule...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends the hook handlers to cover TypeScript/TSX projects, not just Go.
asyncReview→fileSuffixes []string: generalises the singlefileSuffixfield so a reviewer can gate on multiple extensions (e.g..ts+.tsx). Onlyvaluable-commentsused the old field. Also renamescontainsGoComment→containsLineComment(it was already language-agnostic).valuable-comments-ts(async): the comment reviewer for.ts/.tsx. Same rubric structure and principles as the Go reviewer, with the idioms swapped to TS — types/zod/react-hook-form instead of proto/struct-tag validators, JSDoc,.map(), section dividers, etc.react-named-hooks(deterministic, advisory): flagsReact.useXxx(calls and suggests importing the hook by name (import { useState } from 'react'). Matches all hooks; skips non-hook members likeReact.FC/React.ReactNodeand type positions.Wiring
These are registered handlers; enable them in
settings.jsonPostToolUse (Write|Edit) — addreact-named-hooksto the deterministic command andvaluable-comments-tsalongsidevaluable-commentsin the async (asyncRewake) command.Testing
go test ./...andgo vet ./...pass, including new tests for the multi-suffix matching, the TS registration/rubric, and the React-hook detector (positive cases, named-call/non-hook/non-JS/non-Write-Edit negatives, and Edit-scans-NewString-only).🤖 Generated with Claude Code