indent
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"indent": "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;
}
}var a = foo
? bar
: baz;
var a = foo
? bar
: baz;Examples from the ESLint documentation.
indent
eslint
export default [
{
rules: {
"indent": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow the use of alert, confirm, and prompt
Enforce the use of variables within the scope they are defined