Angular

All new or updated code must adhere to the Angular Style Guide, the TypeScript documentation, and the following best practices:

  • Lazy-load modules
  • Always unsubscribe; avoid memory leaks
  • Avoid nested subscriptions
  • Avoid using type any; type everything
  • Avoid adding unnecessary wrappers (e.g.: <div>, <span>) for logic; use <ng-container> instead
  • Avoid inline conditionals
  • Don’t use jQuery
  • Don’t use /deep/, >>>, or ::ng-deep
  • Use Prettier and TSLint/ESLint

Naming Conventions

  • Components, Enums, and Interfaces should be PascalCase
  • Components should have a suffix of Component
    • {ComponentName}Component
    • TableComponent
  • Enums should have a suffix of Type
    • {ComponentName}{EnumName}Type
    • TableColumnType
  • Interfaces should have a suffix of Interface
    • {ComponentName}{InterfaceName}Interface
    • TablePropertiesInterface