| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sorry, something went wrong.
|
I signed it! |
Sorry, something went wrong.
…test suite * Introduce standard process.exitCode = 0 resets in export command test hooks to avoid Bun TypeError: exitCode must be an integer, which throws when assigned to undefined. * Adjust FileReadError OS error test assertions in utils.test.ts to support both Node and Bun formatting structures (checking for ENOENT via error message substring or cause.code). * Fix invalid format test assertions in export.test.ts to inspect the JSON error.message rather than error.error, resolving a stale expectation.
…arnings 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/absent (Issue google-labs-code#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 (i.e. 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 comprehensive test suites verifying frontmatter parsing, model mapping, linter warnings (declared-omission, redundant-omission, unknown-omission), and rule suppressions.
* Update README.md: Add the 'omitted' key to the Token Schema block, update the active rules count to eleven, and add both 'token-like-ignored' and 'omitted-rules' to the summary table. * Update spec.mdx: Add the 'omitted' property to the main schema block and add detailed type explanations for it. * Regenerate spec.md: Run the spec:gen compiler tool to regenerate docs/spec.md with the updated schema content.
There was a problem hiding this comment.
LGTM! Thank you so much @zachshallbetter.
Sorry, something went wrong.
Added a new lint rule, prose-token-leak, to flag literal token value duplication in markdown body text to prevent documentation drift (resolves Issue google-labs-code#16). * Background & Motivation: - YAML frontmatter defines normative values while prose defines context. Restating raw hexes or dimensions in prose creates a duplicate source of truth. - As discussed in Issue google-labs-code#16, prose should reference tokens by name (e.g. {colors.primary}) or conceptual roles. - This rule matches the pattern established in PR google-labs-code#155 (allowing custom/omitted validations) by maintaining linter warnings as the primary quality gate. - Sourced independently of the axis-padding changes to ensure clean merging. * Changes: - Add 'documentSections' to DesignSystemState type interface and forward it inside the model compilation handler. - Implement prose-token-leak.ts using regex verification for colors/dimensions while excluding anchors, HTML tags/comments, and code blocks. - Register the rule in index.ts and update test assertions to expect 12 rule descriptors. - Update spec.mdx to describe the prose token replication policy, and compile docs/spec.md.
| Back | FazBrowse Home | New Git URL |
Implemented support for an optional omitted frontmatter configuration key in DESIGN.md. This allows design system authors to explicitly declare token categories that are intentionally skipped or absent, thereby suppressing default expected-missing warnings (Issue #78).
Background & Motivation
By default, the linter emits missing-sections and missing-typography warnings when standard categories (such as spacing, rounded, or typography) are absent. However, design systems under development or built for restricted contexts (e.g., minimalist layouts) may intentionally exclude some properties. Declaring these omissions under the omitted frontmatter key makes the omission intent explicit to both human reviewers and agents.
Changes