coding-standards

Solid

Universal coding standards - naming, formatting, error handling, immutability, SOLID principles

Code & Development 519 stars 44 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
90
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Coding Standards ## Naming Conventions | Tip | Format | Ornek | |-----|--------|-------| | Variable | camelCase | `userName`, `itemCount` | | Function | camelCase, verb-first | `getUserById`, `calculateTotal` | | Class/Type | PascalCase | `UserService`, `OrderItem` | | Constant | UPPER_SNAKE | `MAX_RETRIES`, `API_URL` | | File | kebab-case | `user-service.ts`, `order-item.ts` | | Boolean | is/has/should prefix | `isActive`, `hasPermission` | ## Immutability ```typescript // YANLIS: Mutate user.name = newName; items.push(newItem); // DOGRU: Yeni obje const updated = { ...user, name: newName }; const newItems = [...items, newItem]; ``` ## Error Handling ```typescript // Custom error class class AppError extends Error { constructor(public code: string, message: string, public statusCode = 500) { super(message); } } // Try-catch with specific errors try { const result = await riskyOperation(); return result; } catch (error) { if (error instanceof ValidationError) { throw new AppError('VALIDATION', error.message, 400); } throw new AppError('INTERNAL', 'Unexpected error', 500); } ``` ## Function Rules - Max 50 satir, tek sorumluluk - Max 3 parametre (fazlasi obje olarak) - Early return (nested if yerine guard clause) - Pure function tercih et (side effect yok) ```typescript // YANLIS: Deep nesting function process(user) { if (user) { if (user.isActive) { if (user.hasPermission) { return doWork(user); } } } } // DOG...

Details

Author
vibeeval
Repository
vibeeval/vibecosystem
Created
4 months ago
Last Updated
1 weeks ago
Language
C#
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category