Skip to content
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

1.5.1 issues #4

Closed
langdonx opened this issue Jul 6, 2017 · 6 comments
Closed

1.5.1 issues #4

langdonx opened this issue Jul 6, 2017 · 6 comments

Comments

@langdonx
Copy link

langdonx commented Jul 6, 2017

With the release of 1.5.1, I've run into 2 issues:

Empty functions get a space put into their body:
1. const a=function(){}; -> const a = function () { };
2. const b=()=>{}; -> const b = () => { };

1.5.1 actually would force a break on the empty arrow functions (fixed in esformatter, but sadly not released).

The whiteSpace.after.FunctionReservedWord: 0 setting is seemingly ignored:
You can see it in the above example, but: go(function(){}); -> go(function () { });

I'm assuming these are because of esformatter-curly? Are there options available to stop the extension from using this plugin?

@leftstick
Copy link
Owner

leftstick commented Jul 7, 2017

For what plugins you want to activate, just change your .esformatter, see mine

I have 5 plugins activated:

{
  "plugins": [
    "esformatter-braces",
    "esformatter-collapse-objects",
    "esformatter-dot-notation",
    "esformatter-literal-notation",
    "esformatter-quotes"
  ]
}

No built-in plugins will be activated automatically

for esformatter issue, i will keep following up

@langdonx
Copy link
Author

langdonx commented Jul 7, 2017

It doesn't appear that the extension is formatting my JavaScript files anymore 1.5.1. The results I was seeing appear to be from VS Code's default JavaScript formatter. I get the same results if I uninstall vscode-esformatter.

Is there a log somewhere or something I can do to figure out why the extension isn't being used when I format document? The Output tab is empty when I select Extensions.

@langdonx
Copy link
Author

langdonx commented Jul 7, 2017

Ah, this appears to be the issue. I saw those dependencies were updated. Any ideas?

image

@leftstick
Copy link
Owner

leftstick commented Jul 7, 2017

Seems the dependency vscode-languageclient was not packaged along with the extension.
I even tried rollback to 1.5.0, and package the extension with latest vsce(official tool for publishing), have the same issue either. Therefor, i think the issue might be caused the the new publishing tool.

Let me report it to vscode team to see if they have any idea about it. Otherwise, i will refactor the extension in another way

@leftstick leftstick reopened this Jul 7, 2017
@leftstick
Copy link
Owner

@langdonx issue fixed, Please give a try with 1.5.2

@langdonx
Copy link
Author

langdonx commented Jul 7, 2017

Looking good, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants