-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect formating with semicolon-less code #75
Comments
This should definitely be handled better. I will open a bug upstream with jsbeautifier. Not to start a semicolon vs no semicolon debate, but it does behave as expected if the require statement is terminated with a semicolon. |
After having a look through the einars/js-beautify issue tracker, it looks like this is part of a larger issue. Based on a cursory glance, I do not see this being fixed any time soon. So, I hate to tell you to use semicolons, as it's perfectly valid as is, but thats the workaround for the time being. Relevant Issues: beautifier/js-beautify#56 , beautifier/js-beautify#200 |
You should still file an issue. We'll evaluate and fix issues on a point-wise basis. |
This is fixed now. 😄 |
Consider this piece of code:
Using JsFormat, this code will be formatted to:
Specifically, it seems like whenever there is a bracket following by a
function
, JsFormat would indent the function definition (incorrectly).The text was updated successfully, but these errors were encountered: