Skip to content

Split tooling changes (removed-token lint, Husky hook, CI depth) from docs PR #1361#1362

Draft
Copilot wants to merge 3 commits intodocs/color-scales-guidefrom
copilot/sub-pr-1361
Draft

Split tooling changes (removed-token lint, Husky hook, CI depth) from docs PR #1361#1362
Copilot wants to merge 3 commits intodocs/color-scales-guidefrom
copilot/sub-pr-1361

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

Addresses review feedback on #1361 that mixed tooling changes with documentation. This PR isolates the tooling changes into a dedicated branch.

Summary

Splits out the tooling changes that were bundled into the color-scales docs PR (#1361). COLOR_SCALES.md lives in the base branch #1361 and is kept in sync via merge. This branch contains only the operational changes needed to enforce removed-token tracking.

List of notable changes:

  • added scripts/checkRemovedTokens.ts — lint script that detects token deletions/renames not documented in src/tokens/removed/
  • added scripts/utilities/extractTokenNames.ts + .test.ts — token name extraction utility with 7 unit tests
  • added package.json: lint:removed script wired into npm run lint
  • updated .github/workflows/ci.yml: fetch-depth: 0 so CI can resolve merge-base with main
  • updated .husky/pre-commit: runs checkRemovedTokens against BASE_REF (falls back to origin/main) before each commit
  • updated src/tokens/removed/removed.json: consolidated single tracking file (replaces color.json), adding 310 missing historical removed/renamed token entries across v7.11.2–v11.7.0
  • updated contributor-docs/agents/token-authoring.md: documents the removal/rename tracking process
  • resolved merge conflict with base branch docs/color-scales-guide — keeping COLOR_SCALES.md version from docs: add comprehensive guide to color scales and contrast patterns #1361

What should reviewers focus on?

  • checkRemovedTokens.ts logic for detecting disappeared token names via git merge-base diff
  • removed.json consolidation — correctness of the 310 added historical entries
  • Husky hook robustness: BASE_REF detection via git symbolic-ref with origin/main fallback

Steps to test:

  1. Delete or rename a token in src/tokens/ without updating src/tokens/removed/removed.json
  2. Run npm run lint:removed — expect a failure listing the undocumented removal
  3. Document the removal in removed.json and re-run — expect ✅ No tokens were removed
  4. Attempt a git commit with an undocumented removal — expect the pre-commit hook to block it

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change
  • Verify the design tokens changed in this PR are expected using the diffing results in this PR

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

⚠️ No Changeset found

Latest commit: 690cebb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] [WIP] Addressing review feedback on color scales and contrast patterns documentation Split tooling changes (removed-token lint, Husky hook, CI depth) from docs PR #1361 Apr 29, 2026
Copilot AI requested a review from lukasoppermann April 29, 2026 12:42
@lukasoppermann
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request keep the version from #1361

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 29, 2026

@copilot resolve the merge conflicts in this pull request keep the version from #1361

Resolved in commit 690cebb4. Merged docs/color-scales-guide into this branch keeping the COLOR_SCALES.md from #1361. The branches are now in sync with no conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants