Common React TypeScript ESLint / Lint Errors & Warning Messages & How To Avoid Them ✨

Eli Elad Elrom
Master React
Published in
12 min readOct 25, 2020

--

Why should you care about lint?

In the past, I worked at a well-known company (that I would not disclose the name) that had a technology debt of over 10,000 compile-time warnings. Many developers wait until the last minute to check the project for warnings and errors to find themselves working on a buggy app that is hard to maintain.

If you are not checking lint on your project, you should.

I put an article that shows how to set ESLint & Prettier using the Airbnb style guides, which is considered the standard for React projects at the time of writing: https://medium.com/react-courses/react-create-react-app-v3-4-1-a55f3e7a8d6d

I also have a template project that can help you be up and running with Unit Testing, lint, formatting, etc from the gate using CRA and must-have libraries, see here: https://github.com/EliEladElrom/cra-template-must-have-libraries

You can use these articles to set your project with ESlint as well as Airbnb style guides.

How to fix these lint errors?

It easy to just disregards these messages and disable the lint error and warning messages with the rules and comments. In fact, sometimes…

--

--