We can customize the linter rules to fit our needs using configuration files or third-party plugins.
eslint-plugin-security is a plugin that adds rules to detect several security vulnerabilities including all of the aforementioned security risks in this lesson.
Linter configuration and usage are beyond the scope of this introductory lesson, but we can see some of their power in the following instructions.
Take a look at the
.json files where we’ve added
Run ESLint in the current directory with the command
Wow, look at that! The
eslint-plugin-security plugin of ESLint caught the issues we discussed previously. Not only does it state the description of the problem, but it also provides the file name and the line number of the problematic code.
Press Next to move on to the next exercise.