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.

New option proposal for `requireObjectKeysOnNewLine`

See original GitHub issue

Per https://github.com/eslint/eslint/issues/5667#issuecomment-219334864

The JSCS rule requireObjectKeysOnNewLine had an allExcept: ['sameLine'] option, that eslint currently lacks. The idea was to configure it so that the following code warned:

var obj = {
  foo: "foo", bar: "bar", baz: "baz"
};
var obj = {
  foo: "foo", bar: "bar",
  baz: "baz" };
var obj = {
  foo: "foo", bar: "bar",
  baz: "baz"
};
var obj = { foo: "foo",
  bar: "bar",
  baz: "baz"
};

and only the following did not:

var obj = { foo: "foo", bar: "bar", baz: "baz" };
var obj = {
  foo: "foo",
  bar: "bar",
  baz: "baz"
};

The allowMultiplePropertiesPerLine isn’t quite the same thing. Can an option be added to support this behavior from jscs?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
mysticateacommented, May 18, 2016

I’m seeing a separate rule for line breaks inside braces: https://github.com/eslint/eslint/issues/6072

1reaction
ljharbcommented, May 17, 2016

Thanks for clarifying - in that case, I misunderstood the previous jscs behavior to be sufficient for my use cases. New option it is!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Port JSCS requireObjectKeysOnNewLine rule · Issue #5667
Please see Proposing a New Rule for instructions. If it's something else, ... New option proposal for requireObjectKeysOnNewLine #6205.
Read more >
Major, Options or Minor Proposal Form
Use this form for all undergraduate major, option, or minor adds, changes, or drops. ... Effective date: New majors, options, or minors become...
Read more >
New Option in an existing program
You may begin announcing and offering the new option to students when the Provost's Office sends the completed proposal and attachments to the...
Read more >
Create a New Proposal
In Custom Proposals , you can create a new proposal from scratch. This option is available if your enterprise uses CRM Plus. To...
Read more >
Proposal Settings Options - iPoint Control - 1
The following options apply specifically to Proposals: Column 1. Prevent Window Refresh on Add: When a part is added to a proposal, ...
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