mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 18:43:44 +00:00
docs(formatter_yaml): pin EOF blank lines divergence (#25269)
This commit is contained in:
1 parent
a56b7d059b
commit
51224a7fb1
3 files changed
+33
No files matched your search
@@ -46,6 +46,8 @@ Stream-tail end comments (`write_end_comments`) are the one document-layer excep
|
||||
Admission reasons and rules: see FORMATTER_POLICY.md "Known divergences". Current divergences:
|
||||
|
||||
- anchor/tag order (prettier#19524): source order is preserved, never reordered
|
||||
- EOF blank lines: the file always ends with exactly one newline, like every other formatter crate
|
||||
(`|+` keep-chomped verbatim tails excepted); Prettier YAML alone preserves EOF blank lines verbatim
|
||||
- `# prettier-ignore` range (prettier#13008): suppresses exactly one node, never every following node
|
||||
- anchor next-line comments (prettier#10518 / #9327): structurally avoided, the positional cursor makes them the next node's leading comments
|
||||
- blank lines (prettier#15528): one unified rule:
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# DIVERGENCE: the file always ends with exactly one newline (`|+` verbatim
|
||||
# tails excepted); Prettier YAML alone keeps EOF blank lines verbatim.
|
||||
last: value
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
source: crates/oxc_formatter_yaml/tests/fixtures/mod.rs
|
||||
---
|
||||
==================== Input ====================
|
||||
# DIVERGENCE: the file always ends with exactly one newline (`|+` verbatim
|
||||
# tails excepted); Prettier YAML alone keeps EOF blank lines verbatim.
|
||||
last: value
|
||||
|
||||
|
||||
|
||||
==================== Output ====================
|
||||
------------------
|
||||
{ printWidth: 80 }
|
||||
------------------
|
||||
# DIVERGENCE: the file always ends with exactly one newline (`|+` verbatim
|
||||
# tails excepted); Prettier YAML alone keeps EOF blank lines verbatim.
|
||||
last: value
|
||||
|
||||
-------------------
|
||||
{ printWidth: 100 }
|
||||
-------------------
|
||||
# DIVERGENCE: the file always ends with exactly one newline (`|+` verbatim
|
||||
# tails excepted); Prettier YAML alone keeps EOF blank lines verbatim.
|
||||
last: value
|
||||
|
||||
===================== End =====================
|
||||
Reference in new issue
Block a user