# arrow-body-style

Rule `eslint/arrow-body-style`. Require braces around arrow function bodies

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 12.6M weekly downloads of presets that enable it
- Trend: +13.3% last quarter
- Rank: #740 by reach, #1427 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `arrow-body-style` | no | safe | package `eslint` | [docs](https://eslint.org/docs/latest/rules/arrow-body-style) |
| Oxlint | `arrow-body-style` | no | safe | plugin `eslint`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/arrow-body-style.html) |
| Biome | `style/useConsistentArrowReturn` | no | safe | group style, since 2.2.3 | [docs](https://biomejs.dev/linter/rules/use-consistent-arrow-return/) |

## Code examples

### Incorrect: the rule reports this

```js
const foo = () => 0;
```

```js
const foo = () => {
    return 0;
};

const bar = () => {
    return {
       bar: {
            foo: 1,
            bar: 2,
        }
    };
};
```

```js
const foo = () => ({});

const bar = () => ({ bar: 0 });
```

### Correct: the rule accepts this

```js
const foo = () => {
    return 0;
};

const bar = (retv, name) => {
    retv[name] = true;
    return retv;
};
```

```js
const foo1 = () => 0;

const foo2 = (retv, name) => {
    retv[name] = true;
    return retv;
};

const foo3 = () => ({
    bar: {
        foo: 1,
        bar: 2,
    }
});

const foo4 = () => { bar(); };
const foo5 = () => {};
const foo6 = () => { /* do nothing */ };

const foo7 = () => {
    // do nothing.
};

const foo8 = () => ({ bar: 0 });
```

```js
const foo = () => {};

const bar = () => { return { bar: 0 }; };
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
export default [
  {
    rules: {
      "arrow-body-style": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "arrow-body-style": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "useConsistentArrowReturn": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb base](https://lintradar.dev/presets/airbnb-base.md) | ESLint | `eslint-config-airbnb-base` | 241 | 6.5M | +2.1% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [eslint/no-promise-executor-return](https://lintradar.dev/rules/eslint/no-promise-executor-return.md): Disallow returning values from Promise executor functions
- [eslint/no-await-in-loop](https://lintradar.dev/rules/eslint/no-await-in-loop.md): Disallow `await` inside of loops
- [eslint/prefer-object-spread](https://lintradar.dev/rules/eslint/prefer-object-spread.md): Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead
- [eslint/no-lonely-if](https://lintradar.dev/rules/eslint/no-lonely-if.md): Disallow `if` statements as the only statement in `else` blocks
- [eslint/grouped-accessor-pairs](https://lintradar.dev/rules/eslint/grouped-accessor-pairs.md): Require grouped accessor pairs in object literals and classes
- [eslint/no-multi-assign](https://lintradar.dev/rules/eslint/no-multi-assign.md): Disallow use of chained assignment expressions

---

Web page: https://lintradar.dev/rules/eslint/arrow-body-style. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
