sonarjs/cyclomatic-complexity
eslint-plugin-sonarjs
No autofix
eslint.config.js
export default [
{
rules: {
"sonarjs/cyclomatic-complexity": "error",
},
},
];Cyclomatic Complexity of functions should not be too high
No code example for this rule
The linters' documentation does not include one we could extract.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
sonarjs/cyclomatic-complexity
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/cyclomatic-complexity": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Variables and functions should not be declared in the global scope
Destructuring syntax should be used for assignments
"if ... else if" constructs should end with "else" clauses