From the course: Angular: 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.

Fixing lint errors

Fixing lint errors - Angular Tutorial

From the course: Angular: Testing and Debugging

Start my 1-month free trial

Fixing lint errors

- [Instructor] Let's run eslint on our project files and see what kind of issues we get. I'll open a new terminal window and type npx eslint source, hit Enter. Looks like we have quite a number of errors 209 errors and 6 warnings. One way to fix these issues is manually, the other way is to take advantage of eslint itself and passing the fix option here into the command line. This should automatically fix quite a number of these issues. Let's do that now. I'll run the eslint command again and add the fix option to the end. That's great, saves us a lot of time going into all those files to manually fix things. Not all issues are fixable this way, but many are and it's a good place to start. Just be sure to double check the files before you save your changes. We'll need to fix the remaining issues manually. In the lint report here, issues are broken out by file. The first line tells us which file the issue was found in and the next line tells us what the issue was. These numbers here on…

Contents