@rulepack/nextjs

v0.1.0Safety checked

Opinionated rules for Next.js 15+/16 App Router projects (server components, async params, no any).

Updated 6/4/20266 files | 5.9 KB
$pnpm dlx rulepack add nextjs

Drops CLAUDE.md / .cursor/rules/* and friends into your project.

Downloads

0

Stars

1

Views

1

nextjs

Opinionated rules for Next.js 15+/16 App Router projects (server components, async params, no any).

npx rulepack add nextjs

What it covers

  • Server-first defaults: Server Components unless interactivity/browser APIs/state demand "use client"; app/ routing, <Link>, and next/image
  • Async params / searchParams: always await them in pages, layouts, and route handlers (Next 16 Promises)
  • Data fetching in Server Components with cache: "no-store" for dynamic and next: { revalidate } for ISR; no client-only libs in server code; loading.tsx over hand-rolled skeletons
  • Strict TypeScript: strict + noUncheckedIndexedAccess, narrow with unknown + guards instead of any, explicit prop type aliases (no React.FC)
  • Tailwind as the styling layer with cn() / clsx for conditional classes; no stray Pages Router APIs (getServerSideProps / getStaticProps)

Source

Rules align with the official Next.js documentation: https://nextjs.org/docs

License

MIT