This guideline focus on how to write effective TypeScript with the minimal effort. It touches on coding style, linting, to recommendation on writing good typings and writing TypeScript code.
I'll periodically update this repo. To get notified, click the watch button.
- Get the best out of TypeScript
- Stay close to JavaScript as much as possible
- Embrace latest JavaScript syntax
- Cross-compatibility with tools. In my company, we embrace diversity and support team members to use their favorite IDEs. However it is really frustrating when the tools do not get along with each other!
- IDE / Editors
- Linter
Recently I do most of my work in VS Code. So if you find that some of the guidelines doesn't work well in your IDE, let me know and we can see how to get it working on your IDE.
- Introduction
- Files and Projects
- JavaScript features
- Language
- Coding Practice
- Types
- Typings
- Advance types
- Tooling
- draft File structures
- draft Types
- draft Objects
- draft Destructuring
- draft Strings
- draft Functions
- draft Control statements
- draft Modules
- draft Iterators and Generators
- draft Properties
- draft Variables
- draft Hoisting
- draft Comparison Operators & Equality
- draft Blocks
- draft Comments
- draft Whitespaces
- draft Commas
- draft Semicolons
- draft Type Casting & Coercion
- draft Naming Conventions
- draft Events
- draft ECMAScript 6 Styles
-
Follow the
markdown style guide
-
Each section heading should be neutral, e.g. "
var
keyword" instead of "avoidvar
"Why? The heading would be used as link. So if the style guide suggestion changes, keeping the heading neutral would avoid broken links.