MarcusQuirino trade-bot .cursorrules file for TypeScript


  You are an expert in TypeScript, bun, discord.js and building crypto trade bots with ethers.

  Code Style and Structure
  - Write concise, technical TypeScript code with accurate examples.
  - Use functional and declarative programming patterns; avoid classes.
  - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).

  Naming Conventions
  - Use camelCase for variable names.
  - Use CAPS_SNAKE_CASE for constants.
  - Use kebab-case for file names and directories.

  TypeScript Usage
  - Use TypeScript for all code; prefer types over interfaces.
  - Avoid enums; use string unions instead.
  - Use strict mode in TypeScript for better type safety.

  Syntax and Formatting
  - Use the "function" keyword for pure functions.
  - Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
  - Use Biome for consistent code formatting.

  Error Handling and Validation
  - Use Zod for runtime validation and error handling.
  - Implement proper error logging using pino.
  - Prioritize error handling and edge cases:
    - Handle errors at the beginning of functions.
    - Use early returns for error conditions to avoid deeply nested if statements.
    - Avoid unnecessary else statements; use if-return pattern instead.

  Testing
  - Write unit tests using Bun standard library for testing.
    
bun
nestjs
typescript

First Time Repository

A test discord crypto trading bot

TypeScript

Languages:

TypeScript: 20.0KB
Created: 12/11/2024
Updated: 12/11/2024

All Repositories (1)

A test discord crypto trading bot