From the course: Angular: Workflows

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Integration with TSLint

Integration with TSLint - Angular Tutorial

From the course: Angular: Workflows

Integration with TSLint

- [Instructor] We previously configured a precommit hook to run TSLint on our staged files, and you can see this in line 12. TSLint is great for checking code and style errors when working with TypeScript and Angular, but Prettier does a much better job at code formatting. While you can configure TSLint to check for code formatting such as single quotes and semicolons, we want to leave that for Prettier. So how do the two work together? It's simple, we can leave the code quality rules for TSLint to handle, and we can have Prettier take care of formatting rules. The next step in integrating Prettier into our Angular app, is to remove the code formatting rules from TSLint and let Prettier handle that. Let's head over to the tslint.json file, and delete the rules that deal with code formatting. Let's leave the comment-format rules, which enforces formatting for single line comments, the curly rule, which adds curly braces for things like if blocks, the end of line rule, the…

Contents