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
What version of this package are you using?
17.1.0
What operating system, Node.js, and npm version?
node16
pnpm8
What happened?
exportfunctionfoo(num){if(typeofnum!=='number')thrownewError('Type wrong')if(num>0)return'great than 0'elseif(num<0)return'less than 0'elsereturn'equal to 0'}
Formatting code above will make the code become hard to read.
exportfunctionfoo(num){if(typeofnum!=='number')thrownewError('Type wrong')if(num>0){return'great than 0'}elseif(num<0){return'less than 0'}else{return'equal to 0'}}
What did you expect to happen?
I hope this tool format the code into:
exportfunctionfoo(num){if(typeofnum!=='number')thrownewError('Type wrong')if(num>0){return'great than 0'}elseif(num<0){return'less than 0'}else{return'equal to 0'}}
Are you willing to submit a pull request to fix this bug?
Yes.
Modifying "brace-style": ["error", "1tbs", { "allowSingleLine": true }], to "brace-style": ["error", "1tbs", { "allowSingleLine": false }], will fix this bug.
The text was updated successfully, but these errors were encountered:
What version of this package are you using?
17.1.0
What operating system, Node.js, and npm version?
node16
pnpm8
What happened?
Formatting code above will make the code become hard to read.
What did you expect to happen?
I hope this tool format the code into:
Are you willing to submit a pull request to fix this bug?
Yes.
Modifying
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
to"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
will fix this bug.The text was updated successfully, but these errors were encountered: