🐛 Parsing problem when using trailing commas after get accessors argument #4317
Labels
A-Parser
Area: parser
L-JavaScript
Language: JavaScript and super languages
S-Bug-confirmed
Status: report has been confirmed as a valid bug
Environment information
What happened?
There seems to be a parsing problem when having a get-Accessor with a comma after the input value like this:
export class DummyComponent {
set input(
value: string,
) {
this._value = value;
}
_value = '';
}
One could remove the comma but in certain scenarios prettier would add the comma back as this should be also a valid state when setting Prettiers "trailing comma" rule to "all"
https://biomejs.dev/playground/?code=ZQB4AHAAbwByAHQAIABjAGwAYQBzAHMAIABEAHUAbQBtAHkAQwBsAGEAcwBzACAAewAKACAAIABzAGUAdAAgAGkAbgBwAHUAdAAoAAoAIAAgACAAIAB2AGEAbAB1AGUAOgAgAHMAdAByAGkAbgBnACwACgAgACAAKQAgAHsACgAgACAAIAAgAHQAaABpAHMALgBfAHYAYQBsAHUAZQAgAD0AIAB2AGEAbAB1AGUAOwAKACAAIAB9AAoACgAgACAAXwB2AGEAbAB1AGUAIAA9ACAAJwAnADsACgB9AA%3D%3D
Expected result
parser should be able to handle trailing commas after input arguments for get accessors
Code of Conduct
The text was updated successfully, but these errors were encountered: