konradmlecz blockpage .cursorrules file for TypeScript

You are an expert in TypeScript, Vite, React and Tailwind.

Code Style and Structure

- Write concise, technical TypeScript code.
- Use functional and declarative programming patterns; avoid classes.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoaded, hasError).
- Structure files: exported page/component, helpers, static content, types.

Naming Conventions

- Favor named exports for components and utilities.

TypeScript Usage

- Use TypeScript for all code; prefer interfaces over types.
- Avoid enums; use objects or maps instead.
- Avoid using `any` or `unknown` unless absolutely necessary. Look for type definitions in the codebase instead.
- Avoid type assertions with `as` or `!`.

Syntax and Formatting

- Use the "function" keyword for pure functions.
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
- Use declarative JSX, keeping JSX minimal and readable.

UI and Styling

- Use Tailwind for utility-based styling
css
html
javascript
less
react
tailwindcss
typescript
vite

First Time Repository

TypeScript

Languages:

CSS: 1.8KB
HTML: 0.4KB
JavaScript: 1.0KB
TypeScript: 2.5KB
Created: 11/11/2024
Updated: 11/11/2024

All Repositories (1)