* Fix closure type cast without spaces
Closure typecasts don't require a space between the `@type` and opening `{`.
* More tests, and add a changelog entry
A simple template literal is initially defined as a literal wherein all the expressions are identifiers or member access expressions where all parts are identifiers. We print these expressions into strings with infinite print width before printing the template.
* Use same print width for range formatting as normal formatting.
Fixes an issue were a file would end up formatted differently
with ranged formatting (--range-start & --range-end) versus
normal whole file formatting.
* Document range bugfix in changelog.
* 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
Fragment variables are an experimental extension to GraphQL schema.
Formatting should follow the same rules as formatting an OperationDefinition node,
hence code is the same.
* docs: Add simplified installation instructions for lint-staged
Currently, to install and configure lint-staged you'd need to manually install all packaged and modify the `package.json`.
With `mrm` it's done automatically depending on what version of Prettier is installed and specified in project's dependencies.
* docs: Update according to feedback
* Update docs/precommit.md
Co-Authored-By: okonet <okonet@users.noreply.github.com>