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>, andnext/image - Async
params/searchParams: alwaysawaitthem in pages, layouts, and route handlers (Next 16 Promises) - Data fetching in Server Components with
cache: "no-store"for dynamic andnext: { revalidate }for ISR; no client-only libs in server code;loading.tsxover hand-rolled skeletons - Strict TypeScript:
strict+noUncheckedIndexedAccess, narrow withunknown+ guards instead ofany, explicit prop type aliases (noReact.FC) - Tailwind as the styling layer with
cn()/clsxfor conditional classes; no stray Pages Router APIs (getServerSideProps/getStaticProps)
Source
Rules align with the official Next.js documentation: https://nextjs.org/docs
License
MIT