node: >= 10.10.0,
npm: >= 6.4.1
We use some open source tools to perform static code analysis:
- TSLint
These tools are automated and doesn't require manual work once they've been set up. They are also integrated in our continuous integration process.
Linting is a process of checking the source code for stylistic as well as programmatic errors. TSLint helps to identify some mistakes that are made during coding. It is also used for adhering best practices and improving code quality and readability.
Our TypeScript code is written in compliance with recommended style guide. It is a set of standards that outline how code should be written and organized and it covers nearly every aspect of TypeScript. We use TSLint with recommended config.
You can run TSLint manually with the following command: npm run lint:ts
.
Setup your IDE/Editor to show you TSLint errors and warnings:
- Go to File ➤ Settings / Default Settings ➤ Languages and Frameworks ➤ TypeScript ➤ TSLint
- Click "Enable" checkbox
- Select Node interpreter
- Specify path to tslint package which is inside the project's
node_modules
folder.
- Go to: View -> Extension or press CTRL + SHIFT + X
- Search for "TSLint" extension, click it and press "Install" button
- Press "Reload" button or reopen the editor