sonarjs/no-ignored-return
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-ignored-return": "error",
},
},
];Return values from functions without side effects should not be ignored
'hello'.lastIndexOf('e'); // Noncompliantlet char = 'hello'.lastIndexOf('e');Examples from the ESLint documentation.
sonarjs/no-ignored-return
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-ignored-return": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Functions should not have identical implementations
Identical expressions should not be used on both sides of a binary operator
Assertions comparing incompatible types should not be made