unicorn/no-useless-override
eslint-plugin-unicorn
Safe autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-useless-override": "error",
},
},
];class Foo extends Bar {
doThing(a, b) {
return super.doThing(a, b);
}
}class Foo extends Bar {
render(...args) {
super.render(...args);
}
}class Foo extends Bar {} // Inherits `doThing` from `Bar`.class Foo extends Bar {
render(...args) {
this.prepare();
super.render(...args);
}
}class Foo extends Bar {
doThing(a) {
return super.doThing(a, true);
}
}Examples from the ESLint documentation.
unicorn/no-useless-override
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-useless-override": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow unnecessary operands in logical expressions involving boolean literals.
Disallow unnecessary existence checks before deletion.
Disallow returning or exporting resources declared with using, including through capturing functions.
Prefer an options object over a boolean in .addEventListener().