You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use braces to start a new block in a case statement to scope some variables, the beautifier moves the braces onto the next line and increases the indentation. However, I would want the braces to remain in line with the case.
I'm having the same problem and it's annoying because the extra indentation caused by the { being on its own line is conflicting with ESLint
Example
Code before beautifying:
constconzole=console,// to bypass ESLint's "no-console" rule without needing to actually change any configurationinput=1;switch(input){case1:
conzole.log("one");break;case2: {conzole.log("two");break;}case3:
conzole.log("three");break;}
ESLint output before beautifying:
✓0errorsandwarnings
Code after beautifying:
constconzole=console,// to bypass ESLint's "no-console" rule without needing to actually change any configurationinput=1;switch(input){case1:
conzole.log("one");break;case2:
{conzole.log("two");break;}case3:
conzole.log("three");break;}
Description
If I use braces to start a new block in a
case
statement to scope some variables, the beautifier moves the braces onto the next line and increases the indentation. However, I would want the braces to remain in line with thecase
.Input
The code looked like this before beautification:
Expected Output
The code should be unchanged after beautification.
Actual Output
The code actually looked like this after beautification:
Environment
Checked on both on the current web beautifier and the current
npm
package.Settings
The text was updated successfully, but these errors were encountered: