1 # Require space before/after arrow function's arrow (arrow-spacing)
3 This rule normalize style of spacing before/after an arrow function's arrow(`=>`).
8 // { "before": true, "after": true }
11 // { "before": false, "after": false }
17 This rule takes an object argument with `before` and `after` properties, each with a Boolean value.
19 The default configuration is `{ "before": true, "after": true }`.
21 `true` means there should be **one or more spaces** and `false` means **no spaces**.
23 Examples of **incorrect** code for this rule with the default `{ "before": true, "after": true }` option:
26 /*eslint arrow-spacing: "error"*/
39 Examples of **correct** code for this rule with the default `{ "before": true, "after": true }` option:
42 /*eslint arrow-spacing: "error"*/
51 Examples of **incorrect** code for this rule with the `{ "before": false, "after": false }` option:
54 /*eslint arrow-spacing: ["error", { "before": false, "after": false }]*/
62 Examples of **correct** code for this rule with the `{ "before": false, "after": false }` option:
65 /*eslint arrow-spacing: ["error", { "before": false, "after": false }]*/
73 Examples of **incorrect** code for this rule with the `{ "before": false, "after": true }` option:
76 /*eslint arrow-spacing: ["error", { "before": false, "after": true }]*/
84 Examples of **correct** code for this rule with the `{ "before": false, "after": true }` option:
87 /*eslint arrow-spacing: ["error", { "before": false, "after": true }]*/