-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
space_after_named_function not working inside an ES6 class #1622
Comments
I can second this as I noticed it as well and (wrongfully) reported it on HookyQR's VSCode Beautify which apparently uses js-beautify in the background. This was my code snippet from the issue there, which is just another bit of code that can be used for reproduction. Full code as well as expected result: export default class StringArrayType extends ArgumentType {
constructor (client) {
super(client, 'stringarray');
}
} Actual result: export default class StringArrayType extends ArgumentType {
constructor(client) {
super(client, 'stringarray');
}
} |
This should be pretty simple but it will need to differentiate from:
This will requires more work than I have time for currently, but here's the test and an incorrect implementation. The correct implementation will recognize that we are inside a |
Added a new PR for this feature |
…ion-classes Fixes #1622 - Adds space_after_named_function option for ES6 classes
From what I can tell this should already have landed in 1.14.3 right? If so it does not seam to be working. JS test:
Python test:
Versions:
|
Yup, not fixed. |
Turns out this was in the 1.14.4 - released today. |
Description
space_after_named_function not working inside an ES6 class. I don't know if this is the indented behaviour or not, but it was not what I was expecting
Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
Steps to Reproduce
Run on https://beautifier.io/
Environment
https://beautifier.io/
Also, ubuntu 18.10
Settings
Example:
The text was updated successfully, but these errors were encountered: