Skip to content

Add formatter to design-tokens - #753

Merged
mkernohanbc merged 5 commits into
mainfrom
feature/design-tokens-prettier
Jun 23, 2026
Merged

Add formatter to design-tokens#753
mkernohanbc merged 5 commits into
mainfrom
feature/design-tokens-prettier

Conversation

@mkernohanbc

Copy link
Copy Markdown
Contributor

This PR duplicates and supersedes #707:

  • Adds Prettier as a devDependency for design-tokens
  • Clones the existing Prettier config from design-system-react-components
  • Adds format and format:check scripts
  • Adds a format:check step to the test workflow in CI

6d3044f directs Prettier to ignore the build and dist folders, 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.

@mkernohanbc
mkernohanbc requested a review from a team as a code owner June 23, 2026 18:41
@mkernohanbc mkernohanbc self-assigned this Jun 23, 2026
@mkernohanbc mkernohanbc added dependencies Changes or issues affecting dependencies design-tokens Changes or issues affecting the design-tokens package labels Jun 23, 2026
@mkernohanbc mkernohanbc added this to the Design tokens v5.0.0 milestone Jun 23, 2026
@mkernohanbc mkernohanbc linked an issue Jun 23, 2026 that may be closed by this pull request
@mkernohanbc
mkernohanbc requested a review from ty2k June 23, 2026 18:41
This reverts commit 63d79a3.
@mkernohanbc mkernohanbc changed the title Feature/design tokens prettier Add formatter to design-tokens Jun 23, 2026
@ty2k
ty2k requested a review from Copilot June 23, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/) in design-tokens.
  • Add format / format:check npm scripts and include Prettier as a devDependency (and lockfile updates).
  • Run format:check in 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.

@ty2k ty2k left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ ✅ ✅

Comment thread packages/design-tokens/build-output.test.js
@mkernohanbc
mkernohanbc merged commit ff55cc3 into main Jun 23, 2026
5 checks passed
@mkernohanbc
mkernohanbc deleted the feature/design-tokens-prettier branch June 23, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Changes or issues affecting dependencies design-tokens Changes or issues affecting the design-tokens package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Prettier formatter to design-tokens

3 participants