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: preserve objects #422

Closed
ttsirkia opened this issue Jun 26, 2015 · 5 comments
Closed

JavaScript: preserve objects #422

ttsirkia opened this issue Jun 26, 2015 · 5 comments
Labels

Comments

@ttsirkia
Copy link
Contributor

It would be a very handful option to preserve the original formatting of objects.

Examples:

var a = {a: 2, b: 3};

view.on('post', {action: 'removeTask'}, function(next) {

These would not be splitted to multiple lines. There are many cases where I'd like to prefer this kind of formatting, especially when passing tiny objects as function parameters etc.

@Glavin001
Copy link
Owner

The default beautifier for JavaScript is JS Beautify. See https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#language-config---javascript---default-beautifier

So I would recommend that you forward this question over to the team at https://github.com/beautify-web/js-beautify

Please include a link reference back to this issue such that other users who may have the same question can follow the reference to your new issue over at js-beautify. Thanks!

@ttsirkia
Copy link
Contributor Author

Ah, OK. I didn't realize that this is just a wrapper for separate modules. I'll put this issue to that repository, thanks for the tip!

@ttsirkia
Copy link
Contributor Author

It seems that this kind of feature has already been requested a long time ago: beautifier/js-beautify#315

@nmccready
Copy link

Does this option still exist? https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#language-config---javascript---default-beautifier I do not see where I can change the beautifier type.

screen shot 2016-01-27 at 12 42 57 pm

screen shot 2016-01-27 at 12 43 11 pm

@ttsirkia
Copy link
Contributor Author

This option is now appearing to js-beautify: beautifier/js-beautify#853

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

No branches or pull requests

3 participants