
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
eslint-plugin-radar
Advanced tools
Radar rules for ESLint to detect bugs and suspicious patterns in your code.
This is a currently maintained fork of SonarJS.
Rules in this category aim to find places in code which have a high chance of being bugs, i.e. don't work as intended.
no-all-duplicated-branches
)no-element-overwrite
)no-extra-arguments
)no-identical-conditions
)no-identical-expressions
)no-one-iteration-loop
)no-use-of-empty-return-value
)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.
cognitive-complexity
)max-switch-cases
)no-collapsible-if
)no-collection-size-mischeck
)no-duplicate-string
)no-duplicated-branches
)no-identical-functions
)no-inverted-boolean-check
) (:wrench: fixable)no-redundant-boolean
)no-redundant-jump
)no-same-line-conditional
)no-small-switch
)no-unused-collection
)no-useless-catch
)prefer-immediate-return
) (:wrench: fixable)prefer-object-literal
)prefer-single-boolean-return
)prefer-while
) (:wrench: fixable)Node.js (>=6.x).
eslint-plugin-radar
using npm
(or yarn
) for you project or globally:npm install eslint-plugin-radar --save-dev # install for your project
npm install eslint-plugin-radar -g # or install globally
eslint-plugin-radar
to the plugins
option of your .eslintrc
:{
"plugins": ["radar"]
}
plugin:radar/recommended
to the extends
option to enable all recommended rules:{
"extends": ["plugin:radar/recommended"]
}
{
"rules": {
"radar/cognitive-complexity": "error",
"radar/no-identical-expressions": "error"
// etc.
}
}
You want to participate in the development of the project? Have a look at our contributing guide!
FAQs
Radar rules for ESLint
We found that eslint-plugin-radar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.