Line breaks with `$` operators
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by reproducing the bslib R6 method-chaining example with air 0.1.2 and compare its current formatting with the proposed line break after each $. Review the formatter entry points for chained $ expressions, then add coverage for the preferred style and confirm that the example formats consistently.
Written by the indexing model from the issue text.
Description
Niche, but with R6 classes method chaining is common. We have the following line in bslib
tq$find(".accordion-button")$removeClass("collapsed")$removeAttrs("aria-expanded")$addAttrs("aria-expanded" = "true")
that air (0.1.2) reformats as
tq$find(".accordion-button")$removeClass("collapsed")$removeAttrs(
"aria-expanded"
)$addAttrs("aria-expanded" = "true")
I personally would have rewritten this as
tq$
find(".accordion-button")$
removeClass("collapsed")$
removeAttrs("aria-expanded")$
addAttrs("aria-expanded" = "true")
Maybe the line break at the first $ could be magical, since most people would probably want to opt into this style.
- Dominant language
- Rust
- Stars
- 446
- Forks
- 32
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/air
-
Difficulty 1/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100