question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to preserve existing var and object alignment (like preserve_array_indentation)

See original GitHub issue

Would it be possible/acceptable to add an option that converts

var short_var = "value";
var very_long_var = "value";

var obj = {
    "short_prop": "value",
    "very_long_property": "value" 
}

to

var short_var     = "value";
var very_long_var = "value";

var obj = {
    "short_prop"        : "value",
    "very_long_property": "value" 
}

Issue Analytics

  • State:open
  • Created 10 years ago
  • Reactions:5
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
creativecagcommented, May 25, 2017

+1. A solution that either handles the spacing or at least ignores the spacing inside objects. I don’t even mind doing the spacing myself (my editor can do that) so long as JSB doesn’t then revert my changes when I save.

2reactions
Nikita240commented, Mar 10, 2015

I’ll try to find some free time to make a PR then 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Align and arrange objects on a slide - Microsoft Support
Align objects. Select the objects you want to align. Press Shift to select multiple objects. Select Picture format > Align and select ...
Read more >
js-beautify - npm
options is an object with the settings you would like used to beautify the code. The configuration option names are the same as...
Read more >
Exploring Data Analysis
Type the name of the dataset to look at the rows and columns of the dataset. View the levels() that the align variable...
Read more >
How to use the Align Tool in Adobe Illustrator - LabelValue
Check out our step-by-step tutorial on how to align objects in Adobe ... Align Tool as well as some of its options in...
Read more >
Define a global variable in a JavaScript function - Stack Overflow
As the others have said, you can use var at global scope (outside of all functions and modules) to declare a global variable:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found