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
Add parentheses for TSTypeQuery
in some case
#13546
Comments
a as ((typeof node.children)[number])[] This one is too many parens. It looks fine and unambiguous without the outer ones: a as (typeof node.children)[number][] Otherwise, I don't think any discussion is needed here. It's a regression in 1.19. |
@thorn0 the goal is to make the input |
Yes, |
@fisker Thank you for the confirmation. I have another question, based on a scenario I encountered while working on this. |
Yes. |
Fixed by #14042 |
Do we have an option to disable this? |
If the purpose of this was for readability, should we have it as optional? |
Please either make this rule optional or revert. Thank you |
Prettier 2.7.1
Playground link
Input:
Output:
Expected behavior:
Same as input
The text was updated successfully, but these errors were encountered: