Skip to content

Improve npm script naming and fix issues#1353

Merged
lukasoppermann merged 2 commits intomainfrom
improve-npm-script-names
Apr 20, 2026
Merged

Improve npm script naming and fix issues#1353
lukasoppermann merged 2 commits intomainfrom
improve-npm-script-names

Conversation

@lukasoppermann
Copy link
Copy Markdown
Collaborator

Summary

Cleans up npm script names for consistency and fixes several small issues.

Renames

Old New Reason
build:config build:types More descriptive — it runs tsc and copies types
validate:contrast check:contrast Aligns with conventional check: prefix
format (check) format:check Clarifies it's read-only
format:fix (write) format Default action devs run locally
install:storybook storybook:install Groups storybook scripts under storybook: prefix
start:storybook storybook Same grouping; natural default name

Fixes

  • Double clean: build called npm run clean but prebuild already does rm -rf dist — removed the redundant call
  • --max-warnings=0: Added to lint (was only on lint:fix, which is backwards)
  • Double-space typo: Fixed in the prettier write command
  • Inconsistent paths: Normalized ./scripts/scripts/

Additions

  • New check script: single command for lint + format:check + test + build

Updated references

All CI workflows and contributor docs updated to use the new names.

Renames:
- build:config → build:types
- validate:contrast → check:contrast
- format:fix → format, format → format:check
- install:storybook → storybook:install, start:storybook → storybook

Fixes:
- Remove double clean (prebuild already handles it)
- Add --max-warnings=0 to lint script
- Fix double-space typo in format command
- Normalize ./scripts/ → scripts/ path prefixes

Additions:
- Add check script (lint + format:check + test + build)

Updates all references in CI workflows and docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lukasoppermann lukasoppermann requested a review from a team as a code owner April 17, 2026 07:19
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 17, 2026

🦋 Changeset detected

Latest commit: ec31b12

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/primitives Patch

Not sure what this means? Click here to learn what changesets are.

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

This comment was marked as outdated.

Agent-Logs-Url: https://github.com/primer/primitives/sessions/4b237951-0d97-409a-aa06-ba330885460b

Co-authored-by: lukasoppermann <813754+lukasoppermann@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new

@lukasoppermann lukasoppermann merged commit 9558473 into main Apr 20, 2026
31 checks passed
@lukasoppermann lukasoppermann deleted the improve-npm-script-names branch April 20, 2026 07:58
@primer primer bot mentioned this pull request Apr 20, 2026
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.

4 participants