arrow-spacing
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"arrow-spacing": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Enforce consistent spacing before and after the arrow in arrow functions
()=> {};
() =>{};
(a)=> {};
(a) =>{};
a =>a;
a=> a;
()=> {'\n'};
() =>{'\n'};() =>{};
(a) => {};
()=> {'\n'};() =>{};
(a) => {};
()=>{'\n'};() => {};
(a) => {};
a => a;
() => {'\n'};()=>{};
(a)=>{};
()=>{'\n'};()=> {};
(a)=> {};
()=> {'\n'};Examples from the ESLint documentation.
arrow-spacing
eslint
export default [
{
rules: {
"arrow-spacing": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce consistent spacing before and after the arrow in arrow functions in <template>
Require for-in loops to include an if statement
Enforce the use of variables within the scope they are defined
Require var declarations be placed at the top of their containing scope
Require grouped accessor pairs in object literals and classes