TypeScript Coding Style Guide? [closed]

The TypeScript team doesn't issue an "official" style guide for other projects using TypeScript. The guidelines for working on the compiler itself are both too specific and not broad enough for general use; I would not use them as a baseline.

Any JavaScript style guide that is up-to-date for ES6 is going to cover nearly all TypeScript constructs except for type annotations, so I would start with your favorite JS style and decide on what you want the rules for type annotations to be.

TSLint is a good choice for enforcing style rules around types / type annotations.

Update: TSLint is currently deprectated in favour of ESLint.


Maybe this is a bit late, but I stumbled upon https://github.com/excelmicro/typescript which also provides a bit more detailed tslint.json in the linters folder ... it is also based on the airbnb/javascript styleguide ...

Yet another Styleguide (which we use for angular 1 development with TypeScript) is https://angular.io/guide/styleguide