Commit 7b9e11a
committed
Make arrow-functions one-liners
Summary:
This fixes the indentation for expression arrow functions
that are continued on multiple lines.
This does not affect the `FunctionBody` variant of arrow functions,
which were already correct due to the opening brace.
Resolves #332.
Test Plan:
Type
```javascript
const myNiftyArrowFunction = (foo, bar) =>
foo + bar;
myNiftyArrowFunction(1, 2);
```
and note that it's indented correctly as you type.
Then run `gg=G` and make sure that it stays indented correctly.
Note also that the indentation of
```javascript
const myFunctionBodiedArrowFunction = (foo, bar) => {
doAThing();
return foo + bar;
};
myFunctionBodiedArrowFunction(1, 2);
```
is still correct.1 parent 255d5e6 commit 7b9e11a
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
0 commit comments