semi-spacing
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"semi-spacing": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
var foo ;
var foo;var bar;
throw new Error("error") ;
while (a) { break ; }
for (i = 0 ; i < 10 ; i++) {}
for (i = 0;i < 10;i++) {}var foo;
var foo ; var bar;
throw new Error("error");
while (a) { break; }
for (i = 0;i < 10;i++) {}
for (i = 0; i < 10; i++) {}var foo;
var foo; var bar;
throw new Error("error");
while (a) { break; }
for (i = 0; i < 10; i++) {}
for (;;) {}
if (true) {;}
;foo();var foo ;
var foo ;var bar ;
throw new Error("error") ;
while (a) {break ;}
for (i = 0 ;i < 10 ;i++) {}Examples from the ESLint documentation.
semi-spacing
eslint
export default [
{
rules: {
"semi-spacing": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce the use of variables within the scope they are defined
Require for-in loops to include an if statement
Require var declarations be placed at the top of their containing scope
Disallow the use of alert, confirm, and prompt