TypeScript custom rules

更新时间:
复制 MD 格式

TypeScript custom rules let you define specific type-checking, compilation, and linting rules in a configuration file. These rules help improve code quality, reduce errors, and enforce a consistent team-wide coding style.

Add a TSLint code scan task

On the pipeline editing page, click parallel task and select TSLint code scan from the right-hand drawer.

Use custom rules

By default, Flow uses standard TSLint rules. To use your own custom rules, add a tslint.json file to your project root.

To learn more about rules, see the TSLint Official Documentation.
  1. To generate a tslint.json file for the first time, run the following command:

    tslint --init
  2. Click save and run. The TSLint code scan task automatically uses the tslint.json file in your project root.