indent-legacy
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"indent-legacy": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
if (a) {
b=c;
function foo(d) {
e=f;
}
}if (a) {
b=c;
function foo(d) {
e=f;
}
}switch(a){
case "a":
break;
case "b":
break;
}if (a) {
b=c;
function foo(d) {
e=f;
}
}if (a) {
b=c;
function foo(d) {
e=f;
}
}switch(a){
case "a":
break;
case "b":
break;
}Examples from the ESLint documentation.
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.
indent-legacy
eslint
export default [
{
rules: {
"indent-legacy": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.