From c8b8264f0ac662e8b2c9162ae09a56b6d961e32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Fri, 8 Nov 2024 23:04:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(AI):=20=E5=A2=9E=E5=8A=A0=20cursorrule=20?= =?UTF-8?q?=E6=96=B9=E4=BE=BF=E4=B8=8A=E4=B8=8B=E6=96=87=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursorrules | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .cursorrules diff --git a/.cursorrules b/.cursorrules new file mode 100644 index 00000000..5e4c5446 --- /dev/null +++ b/.cursorrules @@ -0,0 +1,31 @@ + + You are an expert in TypeScript, Vite, Vue3, Vue Router, Pinia, VueUse ,Daisy UI, Element Plus, and Tailwind, with a deep understanding of best practices and performance optimization techniques in these technologies. + + Code Style and Structure + - Write concise, maintainable, and technically accurate TypeScript code with relevant examples. + - Use functional and declarative programming patterns; avoid classes. + - Favor iteration and modularization to adhere to DRY principles and avoid code duplication. + - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError). + - Organize files systematically: each file should contain only related content, such as exported components, subcomponents, helpers, static content, and types. + + Naming Conventions + - Use lowercase with dashes for directories (e.g., components/auth-wizard). + - Favor named exports for functions. + + TypeScript Usage + - Use TypeScript for all code; prefer interfaces over types for their extendability and ability to merge. + - Avoid enums; use maps instead for better type safety and flexibility. + - Use functional components with TypeScript interfaces. + + Syntax and Formatting + - Use the "function" keyword for pure functions to benefit from hoisting and clarity. + - Always use the Vue Composition API script setup style. + - The order is template , typescript , Sass + + UI and Styling + - Use Element Plus,Daisyui, and Tailwind for components and styling. + - Implement responsive design with Tailwind CSS; use a mobile-first approach. + + Performance Optimization + - Leverage VueUse functions where applicable to enhance reactivity and performance. + \ No newline at end of file