From the course: React: Testing and Debugging

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Linting with ESLint

Linting with ESLint - React.js Tutorial

From the course: React: Testing and Debugging

Start my 1-month free trial

Linting with ESLint

- [Instructor] You can't talk about bugs or bad syntax prevention without talking about linters. Linters are by far one of the best tools to help prevent bad code and syntax errors from finding their way into your app. They also give you great tips about standards. So let's go ahead and set up our linter with some rules. I use Airbnb standards along with some rules for React. They're very strict and conform to high standards as you'll see in a minute. But all these warnings can help you becoming a better developer. So the first thing you need to do if you're using VS Code is to have the extension that will allow you to see the errors inside of VS Code. So you click on Extensions. And then search for ESLint like so. And then select the first one here. It's by Dirk Baeumer, like so. And then install this extension. You may have to restart VS Code. If that's the case, go ahead and do it. And then follow along for the…

Contents