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.

Force objects/arrays/ArgumentLists/FormalParameters that can fit on one line, onto one line

See original GitHub issue
//good
// eslint max-len=16
function foo(
            ham,
            spam,
            eggs,
) { ... }

// bad
function foo(ham, spam, eggs) { ... }

// eslint max-len=100
//bad
function foo(
            ham,
            spam,
            eggs,
) { ... }

// good
function foo(ham, spam, eggs) { ... }

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
not-an-aardvarkcommented, Nov 3, 2016

What about other things, such as comma and brace style? For example, the length of a line will be different depending on whether it’s formatted like this:

function foo(bar,bar,qux)
{
}

or like this:

function foo ( bar, baz, qux ) {
}

I’m worried that having the rule depend on the length of a line has too many potential factors that would depend on other rules.

0reactions
nzakascommented, Dec 28, 2016

Unfortunately, it looks like consensus couldn’t be reached on this issue and so I’m closing it. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach consensus after 21 days tend never to reach consensus, and as such, we close those issues. This doesn’t mean the idea isn’t interesting, just that it’s not something the team can commit to.

Remember, you can still create this rule for yourself and distribute it as a plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I force div contents to stay in one line with HTML and ...
Try this: div { border: 1px solid black; width: 70px; overflow: hidden; white-space: nowrap; }.
Read more >
How to Quickly Merge Multiple Lines into One in Your Word ...
In this article, we'll mainly describe on how to merge your multiple lines into a single line in a convenient way.
Read more >
Change the line spacing in Word - Microsoft Support
Change the line spacing in a portion of the document. Select one or more paragraphs to update. Press Ctrl + A to select...
Read more >
Microsoft Word Tricks: 3 Simple Ways to Keep Text Together
As the name implies, non-breaking characters connects or “glues” the text together and it will all automatically move to the next line together ......
Read more >
How do I combine all lines in a text file into a single line?
tr as you used it should work and is the simplest -- you just need to output to another file. If you use...
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