Skip to content

Conversation

adi-ray
Copy link
Contributor

@adi-ray adi-ray commented Aug 25, 2025

Description

The format script was not properly calling prettier:fix to format files in the root directory. The issue was that turbo prettier:fix only looked for prettier:fix scripts in workspace packages, but the root-level script wasn't being executed.

Validation

  1. Create test files with unformatted code in the root directory.
  2. Verify that pnpm run format now properly formats root files.

Related Issues

Fixes #8108

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 15:15
@adi-ray adi-ray requested review from a team as code owners August 25, 2025 15:15
Copy link

vercel bot commented Aug 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Error Error Aug 25, 2025 3:16pm

Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR fixes the format script to properly format files in the root directory by ensuring the root-level prettier:fix task is executed. The issue was that Turbo's prettier:fix command only looked for scripts in workspace packages, missing the root-level formatting.

  • Added a root-level prettier:fix task configuration in turbo.json
  • Updated the format script to explicitly call the root prettier:fix task

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
turbo.json Adds configuration for the root-level prettier:fix task with cache outputs
package.json Updates format script to explicitly include root prettier:fix task execution

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.88%. Comparing base (5a401ab) to head (f58df37).
⚠️ Report is 14 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8109      +/-   ##
==========================================
- Coverage   75.89%   75.88%   -0.02%     
==========================================
  Files         112      112              
  Lines        9433     9433              
  Branches      303      303              
==========================================
- Hits         7159     7158       -1     
- Misses       2273     2274       +1     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adi-ray adi-ray marked this pull request as draft August 25, 2025 15:38
@avivkeller
Copy link
Member

@adi-ray are you still working on this?

@adi-ray
Copy link
Contributor Author

adi-ray commented Sep 1, 2025

@adi-ray are you still working on this?

The PR contains all the necessary changes required to fix the issue!

  • pnpm run format properly formats root directory files
  • pnpm build completes successfully locally

Not getting why the vercel deployment is failing 🤔

@adi-ray adi-ray marked this pull request as ready for review September 1, 2025 15:38
@avivkeller avivkeller self-assigned this Sep 1, 2025
@avivkeller
Copy link
Member

I'll investigate.

@MattIPv4
Copy link
Member

MattIPv4 commented Sep 1, 2025

Sitemap generation timed out on Vercel, redeploying...

@@ -18,7 +18,7 @@
"cloudflare:preview": "turbo cloudflare:preview",
"deploy": "turbo deploy",
"dev": "turbo dev",
"format": "turbo prettier:fix lint:fix",
"format": "turbo //#prettier:fix prettier:fix lint:fix",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"format": "turbo //#prettier:fix prettier:fix lint:fix",
"format": "turbo //#prettier:fix lint:fix",

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't this also be node --run prettier:fix && turbo lint:fix, since we don't even need turbo for prettier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since rest of the commands were only using turbo-based approach so gave preference to that.

But yeah, we can definitely use direct node.js execution for prettier & turbo for linting. Also then if we don't need turbo for prettier, we should remove the prettier tasks from turbo.json?

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.

format doesn't call prettier:fix
4 participants