SonarJS rules for ESLint to detect bugs and suspicious patterns in your code. Rules in this category aim to find places in code that have a high chance of being bugs, i.e. don't work as intended. All branches in a conditional structure should not have exactly the same implementation. Collection elements should not be replaced unconditionally. Empty collections should not be accessed or iterated. Function calls should not pass extra arguments. Related "if/else if" statements should not have the same condition. Identical expressions should not be used on both sides of a binary operator. Code Smells, or maintainability issues, are raised for places of code which might be costly to change in the future. These rules also help to keep the high code quality and readability. And finally some rules report issues on different suspicious code patters.

Features

  • Return values from functions without side effects should not be ignored
  • Function calls should not pass extra arguments
  • The output of functions that don't return anything should not be used
  • Requires Node.js (>=12.x).
  • Requires ESLint 5.x, 6.x, 7.x or 8.x (peer dependency for the plugin)
  • ESLint and Sonar

Project Samples

Project Activity

See All Activity >

License

GNU Library or Lesser General Public License version 3.0 (LGPLv3)

Follow eslint-plugin-sonarjs

eslint-plugin-sonarjs Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of eslint-plugin-sonarjs!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Source Code Analysis Tool

Registered

2022-10-21