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

Ignore object formatting option? #370

Closed
rwaldron opened this issue Dec 17, 2013 · 5 comments
Closed

Ignore object formatting option? #370

rwaldron opened this issue Dec 17, 2013 · 5 comments

Comments

@rwaldron
Copy link

If I have an array of objects that looks like this:

var methods = [
  { name: "to" },
  { name: "step" },
  { name: "move" },
  { name: "min" },
  { name: "max" },
  { name: "center" },
  { name: "sweep" },
  { name: "stop" },
  { name: "clockWise" },
  { name: "cw" },
  { name: "counterClockwise" },
  { name: "ccw" },
  { name: "write" }
];

It will be transformed into this:

var methods = [{
  name: "to"
}, {
  name: "step"
}, {
  name: "move"
}, {
  name: "min"
}, {
  name: "max"
}, {
  name: "center"
}, {
  name: "sweep"
}, {
  name: "stop"
}, {
  name: "clockWise"
}, {
  name: "cw"
}, {
  name: "counterClockwise"
}, {
  name: "ccw"
}, {
  name: "write"
}];

Which is almost twice the number of lines and arguably less readable. Is there an existing solution to this problem?

@bitwiseman
Copy link
Member

Another example of a limitation caused by #200 and a variation on #315. Worth noting and having a test case for when we fix 315.

@crzidea
Copy link

crzidea commented Apr 25, 2014

+1 for this. Any solution?

@fyockm
Copy link

fyockm commented Apr 26, 2014

👍

@ryanoasis
Copy link

👍

@coreyk
Copy link

coreyk commented Nov 3, 2015

+1
This would be much friendlier than
/* beautify preserve:start */
and
/* beautify preserve:end */

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

No branches or pull requests

6 participants