typescript-style
Installation
SKILL.md
TypeScript style – kickstart-next-ssr
When to use
- Adding or changing
.ts/.tsxfiles - Deciding server vs client components or public env usage
- Aligning with ESLint rules for this project
Instructions
Compiler
- tsconfig.json enables
strict,noEmit,jsx: "react-jsx",moduleResolution: "bundler", and the Next.js TypeScript plugin. - Path alias:
@/*maps to the repository root (e.g.@/lib/contentstack,@/components/ContentstackLivePreview).
React / Next.js boundaries
- Server Components are the default. Use the
"use client"directive only when you need hooks, browser APIs, or client-only SDK init—see components/ContentstackLivePreview.tsx. - Async server components are used in app/page.tsx (
searchParamsas a Promise per Next.js 16 patterns).