1 # Enforce the location of arrow function bodies with implicit returns (implicit-arrow-linebreak)
3 An arrow function body can contain an implicit return as an expression instead of a block body. It can be useful to enforce a consistent location for the implicitly returned expression.
7 This rule aims to enforce a consistent location for an arrow function containing an implicit return.
11 - [`brace-style`](https://eslint.org/docs/rules/brace-style) which enforces this behavior for arrow functions with block bodies.
15 This rule accepts a string option:
17 - `"beside"` (default) disallows a newline before an arrow function body.
18 - `"below"` requires a newline before an arrow function body.
20 Examples of **incorrect** code for this rule with the default `"beside"` option:
23 /* eslint implicit-arrow-linebreak: ["error", "beside"] */
41 Examples of **correct** code for this rule with the default `"beside"` option:
44 /* eslint implicit-arrow-linebreak: ["error", "beside"] */
56 // functions with block bodies allowed with this rule using any style
57 // to enforce a consistent location for this case, see the rule: `brace-style`
68 Examples of **incorrect** code for this rule with the `"below"` option:
71 /* eslint implicit-arrow-linebreak: ["error", "below"] */
80 Examples of **correct** code for this rule with the `"below"` option:
83 /* eslint implicit-arrow-linebreak: ["error", "below"] */
99 If you're not concerned about consistent locations of implicitly returned arrow function expressions, you should not turn on this rule.
101 You can also disable this rule if you are using the `"always"` option for the [`arrow-body-style`](https://eslint.org/docs/rules/arrow-body-style), since this will disable the use of implicit returns in arrow functions.