rename to deprecated

This commit is contained in:
sanjeed5
2025-03-03 23:40:27 +05:30
parent 7a6f5a704d
commit 7f71c5eaa4
882 changed files with 0 additions and 0 deletions
@@ -0,0 +1,5 @@
---
description: Enforces a consistent naming convention for directories across the project.
globs: **/*
---
- Use lowercase with dashes for directories (components/auth-wizard)
@@ -0,0 +1,16 @@
---
description: Applies general coding principles and best practices for TypeScript and React development across the project.
globs: **/*.{ts,tsx}
---
- Write concise, readable TypeScript code.
- Use functional and declarative programming patterns.
- Follow DRY (Don't Repeat Yourself) principle.
- Implement early returns for better readability.
- Structure components logically: exports, subcomponents, helpers, types.
- Use descriptive names with auxiliary verbs (isLoading, hasError).
- Prefix event handlers with 'handle' (handleClick, handleSubmit).
- Use TypeScript for all code.
- Prefer interfaces over types.
- Avoid enums; use const maps instead.
- Implement proper type safety and inference.
- Use `satisfies` operator for type validation.
@@ -0,0 +1,14 @@
---
description: Dictates how asynchronous requests should be handled within Next.js 15, specifically concerning runtime APIs.
globs: app/**/*
---
- Always use async versions of runtime APIs:
typescript
const cookieStore = await cookies()
const headersList = await headers()
const { isEnabled } = await draftMode()
- Handle async params in layouts/pages:
typescript
const params = await props.params
const searchParams = await props.searchParams
@@ -0,0 +1,9 @@
---
description: Specifies the best practices for building React components within the Next.js 15 App Router structure.
globs: app/**/*
---
- Favor React Server Components (RSC) where possible.
- Minimize 'use client' directives.
- Implement proper error boundaries.
- Use Suspense for async operations.
- Optimize for performance and Web Vitals.
@@ -0,0 +1,8 @@
---
description: Defines the recommended state management strategies for Next.js 15 applications, including server and client contexts.
globs: app/**/*
---
- Use `useActionState` instead of deprecated `useFormState`.
- Leverage enhanced `useFormStatus` with new properties (data, method, action).
- Implement URL state management with 'nuqs'.
- Minimize client-side state.