-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Router: fix scala.js style for binPack.callSite
Previously, how we handle `binpack.callSite=true` depended only on `optIn.configStyleArguments`, and `danglingParentheses.callSite` was ignored completely. Also, the declared `scala.js` style, which purported to depend on the existence of a break before closing parenthesis, wasn't properly done. Both opening and closing parentheses were output tucked in all cases but one, when both of them were dangling in the input (and the choice of whether to dangle or tuck depended solely on `configStyleArguments`). Now let's introduce a small modification, so that we can express more formatting alternatives, and fix `scala.js` style. Specifically, associate the two variants above with dangling parentheses in the disabled state. When it's enabled, determine whether to tuck or dangle on break before closing parenthesis. Also, apply config style when that parenthesis is dangling and `configStyleArguments` is disabled (because in the enabled state, it requires both parentheses to be dangling to be triggered).
- Loading branch information
Showing
4 changed files
with
57 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters