Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 516 Bytes

CODESTYLE.md

File metadata and controls

40 lines (29 loc) · 516 Bytes

Coding Style

Under construction ...

TypeScript

Import order

  1. Config
  2. Interfaces
  3. Angular vendor
  4. Other vendors
  5. Modules
  6. Services
  7. Pipes
  8. Classes
  9. Components
  10. Tools

Bad vs Good

Bad :

import { HttpModule, Http } from '@angular/http';

Bad (unsorted) :

import { HttpModule } from '@angular/http';
import { Http } from '@angular/http';

Good (sorted alphabetically) :

import { Http } from '@angular/http';
import { HttpModule } from '@angular/http';