add .mdc file

This commit is contained in:
sanjeed5
2025-02-17 17:50:15 +05:30
parent 2087f9d628
commit 71ac7fc7cc
879 changed files with 7725 additions and 0 deletions
@@ -0,0 +1,11 @@
---
description: This rule provides additional instructions for Next.js development, covering various aspects such as TypeScript, SEO, image optimization, styling, and error handling.
globs: **/*.{js,jsx,ts,tsx}
---
- Use TypeScript for type safety
- Implement proper metadata for SEO
- Utilize Next.js Image component for optimized images
- Use CSS Modules or Tailwind CSS for styling
- Implement proper error boundaries
- Follow Next.js naming conventions for special files
- Use environment variables for configuration
@@ -0,0 +1,11 @@
---
description: This rule enforces Next.js App Router best practices in the 'app' directory.
globs: app/**/*.*
---
- Use server components by default
- Implement client components only when necessary
- Utilize the new file-based routing system
- Use layout.js for shared layouts
- Implement loading.js for loading states
- Use error.js for error handling
- Utilize route handlers for API routes
@@ -0,0 +1,5 @@
---
description: This rule advises using environment variables for configuration in a Next.js project.
globs: **/*.{js,jsx,ts,tsx}
---
- Use environment variables for configuration
@@ -0,0 +1,5 @@
---
description: This rule mandates proper error boundaries for effective error handling in Next.js applications.
globs: **/*.{js,jsx,ts,tsx}
---
- Implement proper error boundaries
@@ -0,0 +1,13 @@
---
description: This rule defines the recommended folder structure for Next.js projects.
globs: app/**/*.*
---
- Adhere to the following folder structure:
app/
layout.js
page.js
components/
lib/
styles/
public/
@@ -0,0 +1,5 @@
---
description: This rule promotes the optimization of images using the Next.js Image component for better performance.
globs: **/*.{js,jsx,ts,tsx}
---
- Utilize Next.js Image component for optimized images
@@ -0,0 +1,5 @@
---
description: This rule helps in following Next.js file naming conventions for special files within the 'app' directory.
globs: app/**/*.*
---
- Follow Next.js naming conventions for special files
@@ -0,0 +1,5 @@
---
description: This rule ensures that SEO best practices are followed through proper metadata implementation in Next.js.
globs: **/*.{js,jsx,ts,tsx}
---
- Implement proper metadata for SEO
@@ -0,0 +1,5 @@
---
description: This rule recommends using CSS Modules or Tailwind CSS for styling components in a Next.js project.
globs: **/*.{js,jsx,ts,tsx,css,scss}
---
- Use CSS Modules or Tailwind CSS for styling
@@ -0,0 +1,5 @@
---
description: This rule encourages the usage of Typescript for type safety across a Next.js project.
globs: **/*.{ts,tsx}
---
- Use TypeScript for type safety