8 Commits

Author SHA1 Message Date
Zach Shallbetter 961439fc06 feat: add omitted frontmatter key to suppress expected-missing lint warnings (#155)
Implement support for an optional omitted frontmatter configuration key in DESIGN.md, allowing design system authors to explicitly declare token categories that are intentionally skipped or absent (Issue #78).

* Update Parser: Add 'omitted' to the known schema keys and types. Implement frontmatter parsing supporting both bare strings (e.g. - spacing) and object mappings with reasons (e.g. section: rounded, reason: "No rounded corners").
* Update Model: Forward the parsed omitted sections to the compiled DesignSystemState. Add optional rule property to linter Findings.
* Implement Omission Validation & Suppression:
  - Create omittedRule to validate the omitted configuration, warning on unknown or redundant sections (if tokens exist for a section listed in omitted).
  - Update missing-sections and missing-typography rules to skip warnings if the targets are explicitly listed as omitted.
  - Register the new rule in the default linter list.
* Test Coverage: Add test suites verifying frontmatter parsing, model mapping, linter warnings (declared-omission, redundant-omission, unknown-omission), and rule suppressions.
* Docs: Document the omitted frontmatter key in README.md and spec.mdx, update active rule counts, and regenerate docs/spec.md.

---------

Co-authored-by: David East <deast@google.com>
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Sudarshan sunil hadmode <sudarshan.deve@gmail.com>
2026-07-27 13:51:59 -04:00
Vedant Wagh bcfd0283ca feat: data-driven Color and Dimension type definitions (fixes #97) (#117)
Test / test (push) Has been cancelled
Test / npm-registry-smoke-windows (push) Has been cancelled
* feat: data-driven Color and Dimension type definitions (fixes #97)

* fix(export): align export test expectations with structured error formats

* fix(ts): eliminate duplicate typeDefinitions identifiers and properties for clean CI compilation

---------

Co-authored-by: David East <deast@google.com>
2026-07-24 17:12:13 -04:00
Julio César Suástegui bde692f2bc fix: render primitive types from spec config (#131)
* fix: render primitive types from spec config

* chore: retrigger cla check

---------

Co-authored-by: Julio César Suástegui <juliosuas@users.noreply.github.com>
2026-07-13 21:46:17 -04:00
David East ef72df6e07 docs: update color spec to document all supported CSS color formats (#96)
The linter already supports oklch, oklab, lab, lch, rgb, hsl, hwb,
named colors, color-mix, and 8-digit hex alpha. But the spec, README,
and error messages all said only hex was accepted. This was blocking
adoption for teams using modern CSS color spaces (Issue #53).

Update the Color type definition in the spec, the token types table in
the README, the spec.mdx source, and the linter error message to
reflect the full range of supported formats.

Closes #53
2026-06-02 01:29:05 -04:00
David East 5361b6ec32 docs: update recommended tokens in spec (#9) 2026-04-20 13:14:05 -04:00
xkxx 59e6c04eb3 docs: update some spec phrasing (#8)
* docs: update spec overflow phrasing under DESIGN.md Format

* docs: update spec markdown and fix generator path

* chore: ignore .turbo directory and remove cached files

* revert: undo changes to code files to focus on markdown
2026-04-15 16:31:26 -04:00
David East 061d82089e feat(cli): ship @google/design.md CLI toolkit (#5)
Consolidates packages/linter into packages/cli as a single @google/design.md package with two entry points: a CLI binary and a programmatic linter API.

Adds four commands: lint, diff, export (--format tailwind|dtcg), and spec. Implements W3C DTCG token export with Terrazzo conformance testing. Decomposes linter into pluggable rule modules. Renames Diagnostic→Finding across the public API. Includes 24-check packaging verification script.
2026-04-13 15:09:11 -04:00
xkxx d2e4e5cb8b docs: move spec.md to docs and streamline 2026-04-10 17:09:16 -07:00