question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove parentheses of sequence expressions breaks code

See original GitHub issue

Prettier 1.19.1 Playground link

--parser babel

Input:

export default (1, 2);

Output:

export default 1, 2;

Second Output:

SyntaxError: Unexpected token, expected ";" (1:17)
> 1 | export default 1, 2;
    |                 ^
  2 | 

Expected behavior:

A case found in #7470

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thorn0commented, Jan 31, 2020

I wrote yesterday, No answer so far.

0reactions
alexander-akaitcommented, Jan 31, 2020

Honestly, I do not know, maybe this really only works for the master, need to write in support

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove Invalid Parentheses - GeeksforGeeks
Below code has a method isValidString to check validity of string, it counts open and closed parenthesis at each index ignoring ...
Read more >
How can I remove text within parentheses with a regex?
If you don't absolutely need to use a regex, useconsider using Perl's Text::Balanced to remove the parenthesis.
Read more >
Removes parentheses in expressions with mixed operators
Simplifying an expression (double parens) is one thing, but removing them is hurtful (for readability). After all, shouldn't prettier prioritize ...
Read more >
Is there a function in Mathematica which removes brackets ...
If you wish to strip the brackets from a single expression in a nontrivial case please consider Delete as described in my answer...
Read more >
Regular Expressions: Regexes in Python (Part 1)
A regex is a special sequence of characters that defines a pattern for ... Now suppose you need to write Python code to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found