Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: add detail to binPack.xxxSite #4040

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4796,11 +4796,11 @@ One can specify the following values to `binPack.preset`:
- [`callSite = Never`](#binpackcallsite)
- [`defnSite = Never`](#binpackdefnsite)
- [`parentConstructors = Never`](#binpackparentconstructors)
- `always` or `true`:
- `Always` or `true`:
- [`callSite = Always`](#binpackcallsite)
- [`defnSite = Always`](#binpackdefnsite)
- [`parentConstructors = Always`](#binpackparentconstructors)
- `oneline`:
- `Oneline`:
- [`callSite = Oneline`](#binpackcallsite)
- [`defnSite = Oneline`](#binpackdefnsite)
- [`parentConstructors = Oneline`](#binpackparentconstructors)
Expand Down Expand Up @@ -4948,7 +4948,17 @@ since v3.0.0:

- `Never` disables the functionality (also takes `false`)
- `Always` enables the functionality (also takes `true`)
- `Oneline` ensures multiline arguments are not binpacked
- `Oneline` ensures multiline arguments are not binpacked, that is, they cannot
be on the same line as any other argument; also, if the multiline argument is
last and the call site is followed by either a curried argument clause or
a chained method, it cannot be on the same line as the next identifier after
the closing delimiter

Additionally, when binpacking is enabled (i.e., not `Never`), some nested
expressions in brackets (if the binpacked clause uses brackets) or in braces
(if it uses parentheses) wouldn't be indented as would happen in usual cases;
this logic is always used for `OnelineSjs`, and only for single-element clauses
otherwise.

When not disabled, these parameters have complex interactions with
[`newline.source`](#newlinessource),
Expand Down
Loading