fix(linter): keep YAML numeric lineHeight as a unitless multiplier - #174
Closed
juliosuas wants to merge 2 commits into
Closed
fix(linter): keep YAML numeric lineHeight as a unitless multiplier#174juliosuas wants to merge 2 commits into
juliosuas wants to merge 2 commits into
Conversation
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #172.
What changed
YAML parses unquoted
lineHeight: 1.6as a number. The typography model only accepted string dimensions, so that value was silently dropped andexport --format dtcgomittedlineHeighteven though it was in the source.Treat a finite numeric
lineHeightas a unitless multiplier (the DTCG meaning). Bare numbers onfontSize/letterSpacingstill error because those properties require an explicit unit.This does not invent a
letterSpacingdefault. DESIGN.md has no source value for that required DTCG field; emitting0would be a separate design choice.Verification
bun test src/linter/model/handler.test.ts src/linter/dtcg/handler.test.ts src/linter/dtcg/conformance.test.ts— 62 passed, 1 skipped, 0 failed.AI assistance
Cursor Grok Bot assisted with investigation, the regression test, and drafting this PR. I reviewed the change and ran the tests above.