agentleFS
ohcnetworkohcnetwork/care_fe/.cursor/rules/02-coding-standards.mdc

care_fe / rules

Cursor rule664 starsChanged 12 months agoMITView on GitHub

We split this 02-coding-standards.mdc into the rules it gives an agent

22 rules. About 0 are common, 17 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use TypeScript for all new code

    line 9
  2. Distinctive:

    Prefer interfaces over types for object definitions

    line 10
  3. Distinctive:

    Use functional components with proper type definitions

    line 11
  4. Very specific:

    Avoid using any type; use proper type definitions

    line 12
  5. Distinctive:

    Use type inference where possible

    line 13
  6. Distinctive:

    Prefer default exports for components

    line 17
  7. Very specific:

    Follow the component naming pattern: ComponentName.tsx

    line 18
  8. Distinctive:

    Place components in appropriate feature directories

    line 19
  9. Distinctive:

    Keep components small and focused

    line 20
  10. Distinctive:

    Use Tailwind CSS for styling

    line 23
  11. Distinctive:

    Follow mobile-first responsive design

    line 24
  12. Distinctive:

    Use Shadcn UI components when available

    line 25
  13. Distinctive:

    Use TanStack Query for API data management

    line 28
  14. Distinctive:

    Prefer React Context for global state

    line 29
  15. Distinctive:

    Use local state for component-specific data

    line 30
  16. Very specific:

    Use kebab-case for directories: auth-wizard/

    line 33
  17. Very specific:

    Use PascalCase for component files: AuthWizard.tsx

    line 34
  18. Very specific:

    Use camelCase for utility files: useAuth.ts

    line 35
  19. Distinctive:

    Write tests in Playwright for E2E testing

    line 38
  20. Distinctive:

    Follow testing guidelines in https://playwright.dev/docs/writing-tests

    line 39
  21. Distinctive:

    Test components in isolation

    line 40
  22. Distinctive:

    Write meaningful test descriptions

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
02-coding-standards.mdc
---
description: 
globs: 
alwaysApply: false
---
# Coding Standards

## TypeScript Guidelines
- Use TypeScript for all new code
- Prefer interfaces over types for object definitions
- Use functional components with proper type definitions
- Avoid using `any` type; use proper type definitions
- Use type inference where possible

## Component Structure
- One component per file is preferred. 
- Prefer default exports for components
- Follow the component naming pattern: `ComponentName.tsx`
- Place components in appropriate feature directories
- Keep components small and focused

## Styling Guidelines
- Use Tailwind CSS for styling
- Follow mobile-first responsive design
- Use Shadcn UI components when available

## State Management
- Use TanStack Query for API data management
- Prefer React Context for global state
- Use local state for component-specific data

## File Naming
- Use kebab-case for directories: `auth-wizard/`
- Use PascalCase for component files: `AuthWizard.tsx`
- Use camelCase for utility files: `useAuth.ts`

## Testing
- Write tests in Playwright for E2E testing
- Follow testing guidelines in https://playwright.dev/docs/writing-tests
- Test components in isolation
- Write meaningful test descriptions

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.