block-spacing
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"block-spacing": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Disallow or enforce spaces inside of blocks after opening block and before closing block
function foo() {return true;}
if (foo) { bar = 0;}
function baz() {let i = 0;
return i;
}
class C {
static {this.bar = 0;}
}function foo() { return true; }
if (foo) { bar = 0;}
class C {
static { this.bar = 0; }
}function foo() { return true; }
if (foo) { bar = 0; }
class C {
static { this.bar = 0; }
}function foo() {return true;}
if (foo) {bar = 0;}
class C {
static {this.bar = 0;}
}Examples from the ESLint documentation.
block-spacing
eslint
export default [
{
rules: {
"block-spacing": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow or enforce spaces inside of blocks after opening block and before closing block in <template>
Disallow the use of alert, confirm, and prompt
Disallow certain properties on certain objects