Setting up ESLint can be difficult due to the many rules and packages available in the market. Many of them provide a pre-configured configuration file that can speed up the process.
In this article, I will introduce some useful ESLint rules and packages that can extend your current configuration and provide better and more secure code.
In this section, I will highlight the ESLint rules related to security and vulnerabilities in your codebase. Finding and fixing vulnerable areas in your code will improve quality and, more importantly, reduce most popular software attacks.
Description: This rule identifies potential security hotspots, such as a dangerous regular expression, square bracket notation, or child process instances.
Description: This is SonarJS rules for ESLint that detect bugs and suspicious patterns.
Description: This rule tries to find the XSS problems in your codebase that are the most common attacks.
Description: This rule will find dangerous HTML assignment without sanitization.
In this section, I will cover some rules and packages that can be useful for writing good quality code.
Description: This is a pre-configured package that provides Airbnb's
.eslintrc. It is also one of the famous configuration with a lot of stars on GitHub.
Description: Another package that provides more than 100 powerful ESLint rules.
Description: If you are concerned about browser support, this package will be of help.
Description: This package will be helpful during working on accessibility.
Thanks for reading ♥️♥️
If this article was helpful, please leave a comment or 👍