Skip to content

Cleanup: Remove root prettierRC and update snapshots#34224

Merged
kasperpeulen merged 1 commit into
nextfrom
chore/removeprettierrc
Mar 20, 2026
Merged

Cleanup: Remove root prettierRC and update snapshots#34224
kasperpeulen merged 1 commit into
nextfrom
chore/removeprettierrc

Conversation

@huang-julien
Copy link
Copy Markdown
Contributor

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

#34183

What I did

Follow-up PR friol #34183 . This is actually one of the reverted commits.

This PR removes prettierRC in our root monorepo as it was modifying codegens snapshots in tests. We can remove prettierRC because codegen formatting relies on users prettier config. The reason we didn't move prettier to OXC is because we don't expect' everyone to move to oxfmt right now, this might be something to handle once oxfmt reaches 1,0

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 need, just check the formatted files

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
    • Updated code formatting configuration and test snapshots to enforce consistent double-quote string literals across the codebase.

@huang-julien huang-julien added cleanup Minor cleanup style change that won't show up in release changelog ci:normal labels Mar 19, 2026
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 19, 2026

View your CI Pipeline Execution ↗ for commit 557fa0d

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ✅ Succeeded 6m 40s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-19 15:29:18 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 19, 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: b7d2203a-8e25-4197-a731-3d7ee90a3afe

📥 Commits

Reviewing files that changed from the base of the PR and between 1c3d424 and 557fa0d.

⛔ Files ignored due to path filters (1)
  • code/lib/codemod/src/transforms/__tests__/__snapshots__/upgrade-deprecated-types.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (4)
  • .prettierrc.json
  • code/core/src/core-server/utils/get-new-story-file.test.ts
  • code/lib/cli-storybook/src/codemod/helpers/story-to-csf-factory.test.ts
  • code/lib/codemod/src/transforms/__tests__/csf-2-to-3.test.ts
💤 Files with no reviewable changes (1)
  • .prettierrc.json

📝 Walkthrough

Walkthrough

The .prettierrc.json configuration file was removed, eliminating custom formatting rules. Subsequently, test snapshots across multiple files were updated to reflect formatting changes, with single-quoted string literals replaced with double-quoted ones in expected outputs.

Changes

Cohort / File(s) Summary
Prettier Configuration Removal
.prettierrc.json
Entire configuration file removed, eliminating custom formatting rules including printWidth, tabWidth, bracket spacing, trailing comma, and quote preferences.
Test Snapshot Formatting Updates
code/core/src/core-server/utils/get-new-story-file.test.ts, code/lib/cli-storybook/src/codemod/helpers/story-to-csf-factory.test.ts, code/lib/codemod/src/transforms/__tests__/csf-2-to-3.test.ts
Test snapshot expectations updated to use double-quoted string literals instead of single quotes across framework imports, component paths, CSF meta objects, and story configurations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@kasperpeulen kasperpeulen merged commit d38952c into next Mar 20, 2026
134 of 140 checks passed
@kasperpeulen kasperpeulen deleted the chore/removeprettierrc branch March 20, 2026 08:36
@github-actions github-actions Bot mentioned this pull request Mar 20, 2026
17 tasks
@yannbf yannbf added the build Internal-facing build tooling & test updates label Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Fails
🚫

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

Generated by 🚫 dangerJS against 557fa0d

@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 Apr 2, 2026
Cleanup: Remove root prettierRC and update snapshots
(cherry picked from commit d38952c)
@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