You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Empty lists and attribute sets containing only comments were not formatting
idempotently. The issue occurred because block comments (/* ... */) initially
parsed as trailing comments on the opening bracket would convert to line
comments (# ...) and move inside the Items during formatting. This AST
structure change caused different rendering behavior between successive runs.
Fixed by ensuring consistent handling of both states:
- Modified `renderList` to use `hardline` separator when items contain only
comments or when the opening bracket has trivia or the opening bracket has
- Updated `isAbsorbable` to treat lists/sets with trivia or only comments
as absorbable in assignments
This ensures the same formatting output regardless of whether comments still are trailing comments for the opening brackets or have already been converted to list comment items.
0 commit comments