Typescript Linting
Created: Jul 15 2025, 08:12 UTC
Last modified: Jul 15 2025, 08:12 UTC
It can be a bit daunting to set up linting and formatting for Typescript. I’ll trying a summarize the state of things here - by which I mean, summarize what we use at Unity, which seems to do the trick.
First, make a distinction between linters and formatters.
- Linters flag possible bugs and bad practices
- Formatters fix your code to conform to style guides.
First, use eslint for linting. This is a Javascript linter that has been updated to support Typescript.
Next, use prettier for formatting. It’s opinionated and generally good.
Note that eslint can also do formatting There is therefore some overlap between these tools, so you have to set them up in such a way that they don’t conflict.