# nextjs Opinionated rules for Next.js 15+/16 App Router projects (server components, async params, no any). ```bash npx rulepack add nextjs ``` ## What it covers - Server-first defaults: Server Components unless interactivity/browser APIs/state demand `"use client"`; `app/` routing, ``, 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