TS linterEdit on GitHub
TS linter allows you to find and fix code style mistakes. It helps a team to follow the same standards and make code more readable.
To analyze and fixTS files, TSLint is used.
For details on 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 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