prettier/tests/assignment_comments
Christopher Chedeau 3b3240bdb8
[assignment] proper group (#4932)
If you have

```js
a = b
```

we used to do

```js
group[a = b]
```

which works most of the time but has the unfortunate side effect that if the left part breaks, we're going to break the `=` as well. So you get

```js
{
  a
} = \n
  b
```

What this PR does it to add a group

```js
group[a group[= b]]
```

so that if the right hand side fits in one line, it should stay that way.

Note that there's a change with a comment being move but I think that it's fine. If I remember correctly, this test was to make sure that we didn't print invalid code, not that it had to be respected (that comment position is not something we really want to support in the first place).

Fixes #4645
2018-08-02 20:26:31 -07:00
..
__snapshots__ [assignment] proper group (#4932) 2018-08-02 20:26:31 -07:00
assignment_comments.js Fix unstable comments in assignment pattern (#1055) 2017-03-20 18:49:42 -07:00
jsfmt.spec.js Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00