ESLint is another great tool to help improve code standards. In this video, Emmanuel Henri finalizes the tools required for this course by installing ESLint, setting up the config file, and adding a plugin to lint live in Visual Studio Code.
- [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 next steps. … So once you're done with this, …
- Setting up for React testing and debugging
- Testing with Jest
- Snapshot testing
- Debugging with Chrome and Chrome extensions
- Optimizing React code with ESLINT
- Type checking