Reviewed by 20X · No signed release verified
- Works with (as stated by the author)
- Claude Code, Cursor
Review details
- Human review
- Review recorded for these files
- Limited checks
- Limited checks recorded (v2.1.0)
- Source
- Source not verified
A verified signature checks published file bytes against a trusted publisher’s signed manifest. It does not verify safety, authorship, rights or assistant use.
Declarations and limited checks do not guarantee safety or sharing rights. Review the files before use. Access that the author has not stated is unknown.
How to use it
- 1Save the file under ~/.claude/rules/ (all projects) or .claude/rules/ inside a project.
- 2Remove any sections that don't apply to your work.
- 3Start a new Claude Code session so the rule is loaded.
Community results
0 reportsNo one has shared a result yet.
1 file. Filenames and raw files are in Technical details.
paths:
- "**/*.tsx"
- "**/*.jsx"
- "/components//*.ts"
- "/components//*.js"
- "/hooks//*.ts"
- "/hooks//*.js"
React Coding Style
This file extends typescript/coding-style.md and common/coding-style.md with React specific content.
File Extensions
.tsxfor any file containing JSX, even one-liner snippets.tsfor pure logic, custom hooks without JSX, type definitions, utilities.test.tsx/.test.tsmirroring the source file- Use
.jsxonly when the project intentionally avoids TypeScript — flag every new untyped React file in review
Naming
- Components:
PascalCasefor both the symbol and the file (UserCard.tsx, default exportUserCard) - Custom hooks:
useCamelCasefor the symbol, kebab-case for the file when the project convention is kebab-case (use-debounce.tsexportsuseDebounce) - Context:
<Domain>Contextsymbol,<Domain>Providerprovider component,use<Domain>consumer hook - Event handlers:
handleClick,handleSubmitinside the component; the prop that receives it isonClick,onSubmit - Boolean props:
isLoading,hasError,canSubmit— neverloadingorerroralone for booleans
Component Shape
type Props = {
user: User;
onSelect: (id: string) => void;
};
export function UserCard({ user, onSelect }: Props) {
return (
<button type="button" onClick={() => onSelect(user.id)}>
{user.name}
</button>
);
}
- Prefer
type Props = {}for closed component prop shapes - Use
interfaceonly when the prop type is extended via declaration merging or exported as a public API extension point - Always destructure props in the parameter list — no
props.useraccess inside the body - Type the return implicitly through JSX (
function Foo(): JSX.Elementonly when the function returns conditionally and the union confuses inference)
JSX
- Self-close tags with no children:
<img />,<UserCard user={u} /> - Use fragments
<>...</>over wrapper<div>when no DOM element is needed - Conditional rendering:
{condition && <Foo />}for booleans, ternary for either/or, early return for guard clauses - Never put logic inline in JSX when it reads as multi-line — extract to a const above the return or a function
// Prefer
const greeting = user.isAdmin ? "Welcome, admin" : `Hello ${user.name}`;
return <h1>{greeting}</h1>;
// Over
return <h1>{user.isAdmin ? "Welcome, admin" : `Hello ${user.name}`}</h1>;
Server / Client Boundary (Next.js App Router, RSC)
- Default a new file to Server Component — only add
"use client"when the file uses state, effects, refs, browser APIs, or event handlers - Place the
"use client"directive on line 1, before any imports - Never import a Client Component file from inside a
"use server"action file - Never re-export server-only code through a client module — the bundler will silently include it
Imports
- React imports first:
import { useState } from "react" - Then third-party libs, then absolute project imports, then relative
- Type-only imports:
import type { ReactNode } from "react"— never mix runtime and type imports in one statement when ESLint'sconsistent-type-importsis configured
Hooks Discipline
See hooks.md for the full ruleset. Style highlights:
- Custom hooks must start with
use— enforced byeslint-plugin-react-hooks - Group all hook calls at the top of the component, before any conditional logic
- Avoid creating ad-hoc hooks for one-line wrappers — inline the call instead
State
- Local first (
useState), lift only when shared - Context for cross-cutting state read by many components (theme, auth, i18n) — not for high-frequency updates
- External store (Zustand, Jotai, Redux Toolkit) when state must persist across route changes, sync across tabs, or be debugged via devtools
- Never duplicate state that can be derived — compute during render
Class Components
Forbidden in new code. Convert legacy class components to function components when touching them for non-trivial changes.
File Layout per Component
components/UserCard/
UserCard.tsx
UserCard.module.css # or styled-components, or Tailwind classes inline
UserCard.test.tsx
index.ts # re-export only
Inline single-file components are fine for trivial presentational pieces.
Latest changes
Initial reviewed release.
Version history
v1.0.0
Initial reviewed release.
File access pausedFile verification
- File integrity
No signed release verified for this version.
This checks published bytes, not safety, authorship, rights or assistant use.
Full compatibility
As stated by the author: Claude Code, Cursor
Included files
1 filecoding-style.md
markdownPublic file access is temporarily paused.
Use in your own tool
Save this resource and connect your assistant in the Use with flow before copying a test request.
Related resources
Dart/Flutter Coding Style (ECC)
Dart/Flutter-specific coding style: formatting tools, idioms, immutability, error handling, and naming.
Claude Code, Cursor
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11
Cypress E2E Testing Rules
Cypress end-to-end testing conventions: selectors, commands, fixtures, and flake prevention.
Cursor
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11
Karpathy-Inspired Coding Guidelines (CLAUDE.md)
Four behavioral rules that stop AI coding agents from over-engineering, guessing, and making unrelated edits.
Claude Code
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Oct 3