Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 507 Bytes

File metadata and controls

29 lines (23 loc) · 507 Bytes

Naming

Why

  • Code consistency

Key points

  • No reference to variable type with TypeScript's enums, interfaces and types:
    • ✅ Good: no reference to type in name
      export enum Colors {
          ACCENT = '#0066ff',
          ATTENTION = '#ffea00',
      //  ...
      }
    • ❌ Bad:
      export enum ColorsEnum {
          ACCENT = '#0066ff',
          ATTENTION = '#ffea00',
      //  ...
      }

Mistakes to avoid when following the standard

Resources