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 put destructured values on the same line

See original GitHub issue

With the following in mind:

const {Test} = suman.init(module);

Test.create((b, it, describe, before, after, beforeEach, afterEach) => {

    const {
        Builder, 
        By,
        Key,
        until 
    } = require('selenium-webdriver');

});

Is there a way to put the destructured args on the same line by default? So it would be:

const {Test} = suman.init(module);

Test.create((b, it, describe, before, after, beforeEach, afterEach) => {

    const { Builder, By, Key, until } = require('selenium-webdriver');

});

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ORESoftwarecommented, Jan 17, 2018

I think you mean brace_style:"preserve_inline" right? thx

0reactions
ORESoftwarecommented, Jan 17, 2018

thanks that worked!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Destructure object and assign to another object in one line
Is there a way to do the following in one line? let person = {} const { firstName, lastName } = getNames() //or...
Read more >
Destructuring assignment - JavaScript - MDN Web Docs
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from ...
Read more >
Destructuring assignment - The Modern JavaScript Tutorial
Destructuring assignment is a special syntax that allows us to “unpack” arrays or objects into a bunch of variables, as sometimes that's more ......
Read more >
Many ways to use Destructuring in Modern JavaScript - Medium
Default Values. When Destructuring properties we can add Default Values to properties that are not defined. Take this example into account:
Read more >
Keep multi-line formatting for destructuring assignment #2550
I think multi-line destructuring should not be collapsed by Prettier. Same concept as the multi-line objects special case.
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