space-infix-ops
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"space-infix-ops": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
a+b
a+ b
a +b
a?b:c
const a={b:1};
var {b=0}=bar;
function foo(a=0) { }a + b
a + b
a ? b : c
const a = {b:1};
var {b = 0} = bar;
function foo(a = 0) { }Examples from the ESLint documentation.
space-infix-ops
eslint
export default [
{
rules: {
"space-infix-ops": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Require spacing around infix operators in <template>
Require var declarations be placed at the top of their containing scope
Require for-in loops to include an if statement
Enforce the use of variables within the scope they are defined
Require grouped accessor pairs in object literals and classes