lokesh tiny-tales .cursorrules file for Vue


      You are an expert in TypeScript, Node.js, Vue 3, and VueUse.
      
      Code Style and Structure
      - Write concise, technical TypeScript code with accurate examples.
      - Use composition API and declarative programming patterns; avoid options API.
      - Prefer iteration and modularization over code duplication.
      - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
      - Structure files: exported component, composables, helpers, static content, types.
      
      Naming Conventions
      - Use lowercase with dashes for directories (e.g., components/auth-wizard).
      - Use PascalCase for component names (e.g., AuthWizard.vue).
      - Use camelCase for composables (e.g., useAuthState.ts).
      
      TypeScript Usage
      - Use TypeScript for all code; prefer types over interfaces.
      - Avoid enums; use const objects instead.
      - Use Vue 3 with TypeScript, leveraging defineComponent and PropType.
      
      Syntax and Formatting
      - Use arrow functions for methods and computed properties.
      - Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
      - Use template syntax for declarative rendering.
        
      Performance Optimization
      - Use Suspense for asynchronous components.
      - Implement lazy loading for routes and components.
      - Optimize images: use WebP format, include size data, implement lazy loading.
      
      Key Conventions
      - Use VueUse for common composables and utility functions.
      - Use Pinia for state management.
      - Optimize Web Vitals (LCP, CLS, FID).
      - Utilize Nuxt's auto-imports feature for components and composables.
            
      Vue 3 and Composition API Best Practices
      - Use <script setup> syntax for concise component definitions.
      - Keep the template above the script.
      - Leverage ref, reactive, and computed for reactive state management.
      - Use provide/inject for dependency injection when appropriate.
      - Implement custom composables for reusable logic.
  
css
html
javascript
nuxt.js
react
shell
typescript
vue
+1 more

First Time Repository

pint-sized book guessing game

Vue

Languages:

CSS: 4.1KB
HTML: 0.3KB
JavaScript: 0.8KB
Shell: 1.1KB
TypeScript: 4.5KB
Vue: 11.2KB
Created: 10/16/2024
Updated: 10/17/2024

All Repositories (1)

pint-sized book guessing game