Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(javascript): preserve parens for type casting for sub-item #4648

Conversation

ikatyang
Copy link
Member

@ikatyang ikatyang commented Jun 7, 2018

Fixes #4287

@@ -5,19 +5,39 @@ const assert = require("assert");
const util = require("../common/util");
const comments = require("./comments");

function hasClosureCompilerTypeCastComment(text, node, locEnd) {
function hasClosureCompilerTypeCastComment(text, path, locStart, locEnd) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you feel about dropping ClosureCompiler from this name since it supports TS too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, that syntax seems coming from closure compiler, see microsoft/TypeScript#5158.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Salsa ≠ TypeScript (the language)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s Salsa then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m1ck2

This comment has been minimized.

@ikatyang ikatyang merged commit 5646573 into prettier:master Jun 11, 2018
@ikatyang ikatyang deleted the fix/javascript-parens-for-type-cast-for-sub-item branch June 11, 2018 11:50
bors bot added a commit to mozilla/delivery-console that referenced this pull request Jun 25, 2018
241: Update dependency prettier to v1.13.6 r=rehandalal a=renovate[bot]

This Pull Request updates dependency [prettier](https://github.com/prettier/prettier) from `v1.13.5` to `v1.13.6`



<details>
<summary>Release Notes</summary>

### [`v1.13.6`](https://github.com/prettier/prettier/blob/master/CHANGELOG.md#&#8203;1136)
[Compare Source](prettier/prettier@1.13.5...1.13.6)
[diff](prettier/prettier@1.13.5...1.13.6)

- Upgrade Flow parser to 0.75.0 ([#&#8203;4649](`prettier/prettier#4649) and [#&#8203;4727](`prettier/prettier#4727))
- Preserve type parameters of import-types in TypeScript ([#&#8203;4662](`prettier/prettier#4662))
- Preserve parens for type casting for sub-item ([#&#8203;4648](`prettier/prettier#4648))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).

Co-authored-by: Renovate Bot <bot@renovateapp.com>
schalkneethling pushed a commit to mdn/interactive-examples that referenced this pull request Jun 27, 2018
This Pull Request updates dependency [prettier](https://github.com/prettier/prettier) from `v1.13.5` to `v1.13.6`



<details>
<summary>Release Notes</summary>

### [`v1.13.6`](https://github.com/prettier/prettier/blob/master/CHANGELOG.md#&#8203;1136)
[Compare Source](prettier/prettier@1.13.5...1.13.6)
[diff](prettier/prettier@1.13.5...1.13.6)

- Upgrade Flow parser to 0.75.0 ([#&#8203;4649](`prettier/prettier#4649) and [#&#8203;4727](`prettier/prettier#4727))
- Preserve type parameters of import-types in TypeScript ([#&#8203;4662](`prettier/prettier#4662))
- Preserve parens for type casting for sub-item ([#&#8203;4648](`prettier/prettier#4648))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Sep 9, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants