Comment on the final line of a case body ends up outside the braces added by the switch-case-braces autofix.
Before autofix:
switch (foo) {
case 'bar':
return 'baz'; // Comment about this line
}
After autofix (current):
switch (foo) {
case 'bar': {
return 'baz';
} // Comment about this line
}
After autofix (desired)
switch (foo) {
case 'bar': {
return 'baz'; // Comment about this line
}
}
This is particularly problematic when the comment is a // eslint-disable-line
that has to remain on the same line.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too