Option to put destructured values on the same line
See original GitHub issueWith 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:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think you mean
brace_style:"preserve_inline"
right? thxthanks that worked!