docs(formatter_core): document tab width in text width policy (#28393)

This commit is contained in:
leaysgur committed 2026-10-29 07:51:18 +00:00
1 parent 0058f7ed8d
commit 658605088a
1 file changed
+1
@@ -119,6 +119,7 @@ Printed text is measured by its display width (`TextWidth` / `text_width`, via `
- East Asian wide and fullwidth characters, and emoji presentation sequences count as 2
- Zero-width characters count as 0: nonspacing and enclosing marks (`Mn` / `Me`), and format characters (`U+200B..U+200F`, `U+FEFF`, ...)
- A tab counts as `tabWidth` wherever it sits, not up to the next tab stop (Prettier counts it as 0, prettier/prettier#20381)
- Everything else counts as 1, ambiguous width included
This holds for the printer's line width and for every heuristic comparing text with a column budget (`tabWidth`, a share of `printWidth`, a short object key, ...),