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
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
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