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.

Ignore object formatting option?

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
coreykcommented, Nov 3, 2015

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

0reactions
ryanoasiscommented, Apr 23, 2015

👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring Code - Prettier
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >
How do I turn off Visual Studio's formatting options?
In the Formatting Options, In the Spacing section: there is an option called 'Ignore spaces in declaration statements'. Check that option, and VS....
Read more >
Format Object (Text Box pane) - Microsoft Support
When you change options in this dialog box, the changes are immediately applied to your shape or text box, making it easy to...
Read more >
Use object styles to format objects in an InDesign document
Use object styles to format objects in an InDesign document with settings such as stroke, color transparency, and text wrap.
Read more >
Re: Is it possible to disable the formatting?
If you mean the format option, it is the basic part of the formatting option, you cant do custom to disable it.
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