-
-
Notifications
You must be signed in to change notification settings - Fork 983
formatter: Support ignore comment on same line #16915
Copy link
Copy link
Labels
A-formatterArea - FormatterArea - FormatterC-docsCategory - Documentation. Related to user-facing or internal documentationCategory - Documentation. Related to user-facing or internal documentationE-Help WantedExperience level - For the experienced collaboratorsExperience level - For the experienced collaborators
Metadata
Metadata
Assignees
Labels
A-formatterArea - FormatterArea - FormatterC-docsCategory - Documentation. Related to user-facing or internal documentationCategory - Documentation. Related to user-facing or internal documentationE-Help WantedExperience level - For the experienced collaboratorsExperience level - For the experienced collaborators
Type
Fields
Give feedbackPriority
None yet
Start date
None yet
Target date
None yet
Effort
None yet
This may be non-standard because the Prettier ignore docs don't mention it, but Prettier supports putting the
// prettier-ignorecomment on the same line as the code you want ignored (example). Oxfmt supports this on the line before (#14808), but not on the same line. I think it would be perfectly reasonable to close this as a wontfix — just wanted to flag it in case full compatibility is the goal. This is the source of like 95% of the diff vs. Prettier when I tried oxfmt just now on the oxidecomputer/console codebase.oxc/crates/oxc_formatter/src/formatter/comments.rs
Lines 368 to 376 in d77e22d