Format chained functions on the same line as the original call
I can't seem to find a setting that allows me to do this. I work with a lot of promises and require a little bit of nesting, but with the settings in Webstorm JavaScript a chained method call will align indented. Here's an example of how it currently works, and another example of how I want it to work:
How it is:
service.getSomething()
.then(function(something) {
service.handleSomething()
.then(function (handledSomething) {
// do stuff
})
});
How I want it:
service.getSomething()
.then(function(something) {
service.handleSomething()
.then(function (handledSomething) {
// do stuff
})
});
Any ideas?
请先登录再写评论。
No way to do this currently, please vote for https://youtrack.jetbrains.com/issue/WEB-10215