TS linterEdit on GitHub
202307.0 release, this tool is no longer supported and has been replaced by
ESLint. To migrate to
ESLint, follow Migration guide - Switch from TSLint to ESLint.
TS Linter allows you to find and fix code style mistakes. It helps a team follow the same standards and make code more readable.
To analyze and fix files, TSLint is used.
For details about how to install the TS Linter for your project, see the TS Linter integration file.
Using TS Linter
To execute the TS Linter, do the following:
- Install the Node.js modules:
- Execute the TS Linter in:
- validation mode:
npm run yves:tslint
- fix mode:
npm run yves:tslint:fix
TS Linter config
The config for tslint resides in
To redefine the path for the config, adjust
/frontend/libs/tslint.js and use other rules for the TS Linter.
The TS Linter rules related to formatting aren’t included in
tslint.json to avoid duplication with the Prettier rules.
CI checks and pre-commit hook
The TS Linter is integrated into:
- Pre-commit hooks.
The function that executes TS Linter before the commit resides in
Command to run the TS Linter is integrated into
- node ./frontend/libs/tslint --format stylish
If you commit without the pre-commit hooks, you should run the TS Linter manually to avoid issues with Travis.
For submitting the form