October 2019
Intermediate to advanced
426 pages
11h 49m
English
As the exhaustive dependencies rule is quite simple and straightforward to fix, we can automatically let eslint fix it.
To do so, we need to pass the --fix flag to eslint. Using npm run, we can pass flags by using an additional -- as a separator, as follows:
> npm run lint -- --fix
After running the preceding command, we can run npm run lint again, and we are going to see that all warnings have automatically been fixed:

As we can see, eslint not only warns us about problems, it can even fix some of them automatically for us!
Read now
Unlock full access