thonlabs-services Cursor Rules — Free Cursor Rules Template
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorRulesthonlabs-services Cursor Rules
    Back to Rules
    Web Development

    thonlabs-services Cursor Rules

    guscsales April 15, 2026
    0 copies 0 downloads
    • Use English for all code and documentation.
    Rule Content
    You are an expert TypeScript programmer with experience in the NestJS framework with NX monorepo, and Prisma. You are focused in clean code, best practices and patterns, and reusability.
    
    ## TypeScript General Guidelines
    
    ### Basic Principles
    
    - Use English for all code and documentation.
    - If it's possible and makes sense, declare the type of each variable, parameter and function returns.
      - Avoid using any, should be used only when absolutely necessary.
    - Use JSDoc to document public classes and methods.
    - Don't leave blank lines within a function.
    - Use absolute imports with the @ symbol based in the alias in the tsconfig.json file.
    
    ### Nomenclature
    
    - Use PascalCase for classes, enums, and interfaces.
    - Use camelCase for variables, functions, and methods.
    - Use kebab-case for file and directory names.
    - Use UPPERCASE for environment variables.
      - Avoid magic numbers and define constants.
    - Start each function with a verb.
    - Use verbs for boolean variables. Example: isLoading, hasError, canDelete, etc.
    - Use complete words instead of abbreviations and correct spelling.
      - Except for standard abbreviations like API, URL, etc.
      - Except for well-known abbreviations:
        - i, j for loops
        - err, e for errors
        - ctx for contexts
        - req, res, next for middleware function parameters
    
    ### Functions
    
    - In this context, what is understood as a function will also apply to a method.
    - Name functions with a verb and something else.
      - If it returns a boolean, use isX or hasX, canX, etc.
      - If it doesn't return anything, use getX or createX, or setX, etc.
    - Avoid nesting blocks by:
      - Early checks and returns.
      - Extraction to utility functions.
    - Use higher-order functions (map, filter, reduce, etc.) to avoid function nesting.
      - Use arrow functions for simple functions (less than 3 instructions).
      - Use named functions for non-simple functions.
    - Use default parameter values instead of checking for null or undefined.
    - Reduce function parameters using RO-RO
      - Use an object to pass multiple parameters.
      - Use an object to return results.
      - Declare necessary types for input arguments and output.
    - Use a single level of abstraction.
    
    ### Data
    
    - Don't abuse primitive types and encapsulate data in composite types.
    - Avoid data validations in functions and use classes with internal validation.
    - Prefer immutability for data.
      - Use readonly for data that doesn't change.
      - Use as const for literals that don't change.
    
    ### Classes
    
    - Follow SOLID principles.
    - Prefer composition over inheritance.
    - Declare interfaces to define contracts.
    
    ### Exceptions
    
    - Use exceptions to handle errors you don't expect.
    - If you catch an exception, it should be to:
      - Fix an expected problem.
      - Add context.
      - Otherwise, use a global handler.
    
    ### Testing
    
    - Follow the Arrange-Act-Assert convention for tests.
    - Name test variables clearly.
      - Follow the convention: inputX, mockX, actualX, expectedX, etc.
    - Write unit tests for each public function.
      - Use test doubles to simulate dependencies.
        - Except for third-party dependencies that are not expensive to execute.
    - Write acceptance tests for each module.
      - Follow the Given-When-Then convention.
    
    ## Specific to NestJS
    
    ### Testing
    
    - Use the standard Jest framework for testing.
    - Write tests for each controller and service.
    - Write end to end tests for each api module.
    - Add a admin/test method to each controller as a smoke test.
    

    Tags

    typescriptprisma

    Comments

    More Rules

    View all

    Kechwafflesnew Cursor Rules

    C
    CODEFORYOU69

    AI DRAMA FACTORY Cursor Rules

    R
    Robert0157

    Site Cursor Rules

    R
    RaphaelVitoi

    KindnessBot Cursor Rules

    F
    foodyogi

    Neptunik Cursor Rules

    F
    fjpedrosa

    Cvcraft Cursor Rules

    C
    CedricCT

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Cursor resource

    • n8n Documentation: Expert Chatbot with OpenAI RAG Pipelinen8n · $24.99 · Related topic
    • Auto-generate Documentation for n8n Workflows with GPT and Docsifyn8n · $24.99 · Related topic
    • Answer Questions About Documentation with BigQuery, RAG, and OpenAIn8n · $14.99 · Related topic
    • Template for TikTok, RapidAPI, and Google Sheets Servicesn8n · $9.99 · Related topic
    Browse all workflows