Add formatter to design-tokens - #753
Merged
Merged
Conversation
This reverts commit 63d79a3.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds formatting support to the packages/design-tokens workspace by introducing Prettier configuration, scripts, and CI enforcement, plus a small test-script cleanup fix.
Changes:
- Add Prettier config + ignore rules for generated outputs (
build/,dist/) indesign-tokens. - Add
format/format:checknpm scripts and include Prettier as a devDependency (and lockfile updates). - Run
format:checkin the design-tokens CI workflow and fix the test cleanup command to remove SCSS build outputs.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/design-tokens/prettier.config.js | Adds an ESM Prettier configuration aligned with the repo’s existing react-components setup. |
| packages/design-tokens/.prettierignore | Prevents formatting of generated build/ and dist/ artifacts. |
| packages/design-tokens/package.json | Adds Prettier devDependency and format / format:check scripts. |
| packages/design-tokens/package-lock.json | Locks Prettier dependency update. |
| packages/design-tokens/build-output.test.js | Ensures SCSS build folders are removed before running build-output in tests; minor formatting cleanup. |
| .github/workflows/test_design_tokens_build.yaml | Adds a CI step to enforce npm run format:check for design-tokens. |
Files not reviewed (1)
- packages/design-tokens/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR duplicates and supersedes #707:
design-tokensdesign-system-react-componentsformatandformat:checkscriptsformat:checkstep to the test workflow in CI6d3044f directs Prettier to ignore the
buildanddistfolders, so that the formatter doesn't touch the generated output.6702034 patches a gap in the test script that Copilot spotted, so that SCSS folders are properly removed before testing.