prettier/src
Justin Ridgewell c085aeb152 Fix closure compiler type casts (#5947)
* Fix closure compiler type casts

This fixes casts when they are followed by a closing parenthesis, eg:

```js
foo( /** @type {!Array} */(arrOrString).length );
```

The old code would see the `CallExpresion`'s closing `)` and assume the typecast belonged to the `MemberExpression`, not the `arrOrString` `Identifier`.

This would be easier to accomplish if every AST would tell us if the expression were parenthesized. If they did, we could check that the node were parenthesized and either it or an ancestor has a typecast, stopping when we find an ancestor is itself parenthesized.

* More tests, and changelog

* Fix while loop

* Update changelog

* Update CHANGELOG.unreleased.md

* Use babel's parenthesized information

* Cleanup call
2019-04-26 13:05:57 -04:00
..
cli Honor stdin-filepath when outputting error messages. (#5878) 2019-02-20 08:39:25 -05:00
common feat: autoload plugins that are located in `@*/prettier-plugin-* (#5945) 2019-03-10 20:34:04 +11:00
config Support shared Prettier configuration (#5963) 2019-03-13 09:34:51 +11:00
doc Bump Prettier dependency to 1.15.0 2018-11-07 09:12:25 +08:00
language-css Fix formatting of lists in SCSS property/variable values (#5710) 2019-01-10 00:08:34 +08:00
language-graphql graphql: Support variable directives. (#6020) 2019-04-04 09:47:05 -03:00
language-handlebars Escape Quotes in Glimmer String Literals (#5143) 2018-10-05 22:19:33 +02:00
language-html Bump Prettier dependency to 1.17.0 2019-04-12 17:44:48 -03:00
language-js Fix closure compiler type casts (#5947) 2019-04-26 13:05:57 -04:00
language-markdown feat(markdown): do not align table contents if it exceeds the print width and `--prose-wrap never` is set (#5701) 2019-01-30 12:24:21 -05:00
language-yaml fix: get rid of CRLF (#5494) 2018-12-08 18:28:29 +08:00
main Fix trailing comment output when the printer returns a doc instead of a string. (#5930) 2019-03-03 11:15:08 -08:00
utils Fix CI detection to avoid unwanted TTY behavior (#5804) 2019-01-30 14:08:03 +08:00
index.js refactor: move index.js and standalone.js to src (#5054) 2018-09-06 13:51:18 +08:00
standalone.js feat: support HTML/Vue/Angular (#5259) 2018-11-04 23:03:07 +08:00