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

JavaScript code formatting not working properly after v0.10.10 #7459

Closed
egamma opened this issue Mar 10, 2016 · 4 comments
Closed

JavaScript code formatting not working properly after v0.10.10 #7459

egamma opened this issue Mar 10, 2016 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@egamma
Copy link
Member

egamma commented Mar 10, 2016

From @mlakmal on March 8, 2016 0:47

We are extensively using javascript auto format code feature in vs code to reduce js lint errors.
Ex: spaces after function and function name etc ...

after updating to v0.10.10 above formatting is not working any more and it reset all the formatted functions without spaces.

Can someone help or give information how to override this rule ?

var test = function() { }; //this is what new version format js code to.

but we are expecting and previously worked before like below.
var test = function () { };

Copied from original issue: microsoft/vscode#3796

@egamma
Copy link
Member Author

egamma commented Mar 10, 2016

This is a duplicate of #6700.

@egamma
Copy link
Member Author

egamma commented Mar 10, 2016

Moving to Salsa

@billti
Copy link
Member

billti commented Mar 10, 2016

@egamma This doesn't look like a dupe of #6700, which was a bug where it was removing indentation at the start of the line as you type (and is now fixed). This looks like a preference to have a space between the keyword function and the opening paren in a function expression (which is only reformatted when "Format code" is specifically executed, I don't see this happen as I type).

@egamma
Copy link
Member Author

egamma commented Mar 10, 2016

@billti you are correct, sorry about that.

For the March update we will expose the TS formatter settings to the user as user settings microsoft/vscode#3721 so this should cover this request and we will use this issue as a test case.

@egamma egamma closed this as completed Mar 10, 2016
@mhegazy mhegazy added the Duplicate An existing issue was already created label Mar 10, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants