Skip to content

Cleanup: Add back fmt:check into nx#34306

Merged
huang-julien merged 2 commits into
nextfrom
nx/fmt
Mar 24, 2026
Merged

Cleanup: Add back fmt:check into nx#34306
huang-julien merged 2 commits into
nextfrom
nx/fmt

Conversation

@huang-julien
Copy link
Copy Markdown
Contributor

@huang-julien huang-julien commented Mar 24, 2026

Closes #

What I did

Did a small mistake in the former oxfmt PR. We remove fmt:check from yarn lint but forgot to add it back into nx.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  • no test needed

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Chores
    • Code formatting verification (fmt) has been added to the automated CI pipeline so formatting checks run alongside existing build and test tasks.
    • A project-level formatting target was introduced to enable centralized format-checking and caching, ensuring consistent formatting verification across the workspace.

@huang-julien huang-julien enabled auto-merge March 24, 2026 15:11
@huang-julien huang-julien changed the title Build: Add back fmt:check into nx Cleanup: Add back fmt:check into nx Mar 24, 2026
@huang-julien huang-julien added ci:merged Run the CI jobs that normally run when merged. cleanup Minor cleanup style change that won't show up in release changelog ci:normal and removed ci:merged Run the CI jobs that normally run when merged. labels Mar 24, 2026
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 24, 2026

View your CI Pipeline Execution ↗ for commit a817cb9

Command Status Duration Result
nx run-many -t compile,check,knip,test,lint,fmt... ✅ Succeeded 6m 35s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-24 15:51:02 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dc0505e9-87a9-4ea7-89f3-7e67a7f0d1c5

📥 Commits

Reviewing files that changed from the base of the PR and between 2a03531 and a817cb9.

📒 Files selected for processing (1)
  • code/project.json
✅ Files skipped from review due to trivial changes (1)
  • code/project.json

📝 Walkthrough

Walkthrough

Adds a new Nx fmt target that runs yarn fmt:check and includes that target in the CI ALL_TASKS list so formatting checks run as part of the NX task runner in GitHub Actions.

Changes

Cohort / File(s) Summary
Nx project target
code/project.json
Added new targets.fmt using nx:run-commands with options.command: "yarn fmt:check", cache: true, and inputs: ["sharedGlobals", "{workspaceRoot}/**/*"].
CI workflow
.github/workflows/nx.yml
Inserted fmt into the ALL_TASKS environment variable so fmt is included when yarn nx run-many -t $ALL_TASKS and when Nx agents are stopped after ALL_TASKS.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@code/project.json`:
- Around line 6-12: The fmt target in project.json runs "yarn fmt:check" but its
inputs only include "default", risking cache staleness; either expand the
"inputs" to include workspace-wide files that the formatter touches or restrict
the command to the project directory by adding a "cwd": "{projectRoot}" option
to the fmt target (matching the lint target pattern). Locate the "fmt" target
entry and update its "inputs" to cover the workspace files used by oxfmt (e.g.,
add shared/workspace inputs) or add the "cwd": "{projectRoot}" key alongside
"options" so the yarn fmt:check command only checks the projectRoot, then run
the formatter check to verify caching behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cde1cb46-9d0c-46d1-bcc3-0582b177d2b6

📥 Commits

Reviewing files that changed from the base of the PR and between b31240c and 2a03531.

📒 Files selected for processing (2)
  • .github/workflows/nx.yml
  • code/project.json

Comment thread code/project.json
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@kasperpeulen kasperpeulen changed the title Cleanup: Add back fmt:check into nx Build: Add back fmt:check into nx Mar 24, 2026
@kasperpeulen kasperpeulen changed the title Build: Add back fmt:check into nx Cleanup: Add back fmt:check into nx Mar 24, 2026
@huang-julien huang-julien merged commit a8048f5 into next Mar 24, 2026
36 of 63 checks passed
@huang-julien huang-julien deleted the nx/fmt branch March 24, 2026 15:57
@github-actions github-actions Bot mentioned this pull request Mar 24, 2026
15 tasks
@JReinhold JReinhold added the build Internal-facing build tooling & test updates label Mar 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Fails
🚫

Please choose only one of these labels: ["cleanup","build"]

Generated by 🚫 dangerJS against a817cb9

@valentinpalkovic valentinpalkovic added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Mar 31, 2026
@github-actions github-actions Bot mentioned this pull request Mar 31, 2026
19 tasks
valentinpalkovic pushed a commit that referenced this pull request Mar 31, 2026
Build: Add back fmt:check into nx
(cherry picked from commit a8048f5)
@github-actions github-actions Bot mentioned this pull request Apr 2, 2026
19 tasks
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal cleanup Minor cleanup style change that won't show up in release changelog patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants