-
Notifications
You must be signed in to change notification settings - Fork 1
JavaScript TypeScript Coding Standard
Darren Siegel edited this page Apr 30, 2019
·
3 revisions
Pure JavaScript code should conform to the AirBnb JavaScript coding standard.
Highlights of this coding standard include:
- Use soft tabs (space character) set to 2 spaces
- ' characters for string literals instead of " characters
- { opening brace on same line as beginning of statement
- camelCase when naming objects, functions, and instances
- Use PascalCase only when naming constructors or classes.
TypeScript code should also conform to the AirBnb JavaScript coding standard, as well as adhere to the following additional conventions:
- None yet
This git repository is set up to automatically run tslint against commits to ensure adherence to the above coding standards. In some rare cases it is necessary to bypass a specific tslint rule (notably in variable names of React functional components). Information about how to do that via comments can be found here
React code should also conform to the AirBnb React coding standard