-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(installation): Update Hoisted dependencies step to help users with Prettier/EsLint #4580
base: canary
Are you sure you want to change the base?
Conversation
Added extra information about hoisted pnpm packages. Because without prior knowledge about hoisting you may end up with broken Prettier and EsLint. Read more here: pnpm/pnpm#8878
|
@J4v4Scr1pt is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe pull request updates the installation documentation for users utilizing Changes
The added configuration lines are: public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier* These lines ensure that Prettier and ESLint dependencies are correctly hoisted when using 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/docs/content/docs/guide/installation.mdx (1)
154-155
: Consider enhancing the note's clarity.While the addition is helpful, consider making it more explicit about why users might need to hoist these dependencies.
-If you are using Prettier and/or EsLint include them accordingly. +If you are using Prettier and/or ESLint, you'll need to hoist these dependencies to ensure they work correctly with your project's root configuration.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/docs/content/docs/guide/installation.mdx
(1 hunks)
🔇 Additional comments (1)
apps/docs/content/docs/guide/installation.mdx (1)
156-160
: LGTM! Clear and helpful configuration example.The configuration block clearly shows how to hoist HeroUI, ESLint, and Prettier dependencies. The syntax is correct and follows the pnpm configuration format.
It seems that |
The reason I added Prettier was because of it being default in the pnpm array. But maybe that is for early versions of Prettier? |
There may be other uses. For a Next.js + ESLint 9 project, using Flat Config, with |
Ahh ok, maybe I should add som more info context the step then maybe? What you think? |
Yes, it seems that a case-by-case explanation is needed. |
Ok great then I will fix this 👍 |
Added more context to the hoist pattern
I have updated the docs now to be more clear. Prettier <3 need the hoist pattern. |
Only for me. My project previously used Next.js 14, EsLint 8 and Prettier 3.4, without needing any |
I had a similar experience expect that neither EsLint 8 or 9 worked 😅. But according to the PR they removed the defaults because of version 9 and the flat config. That's why I tried to inform that in the information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is originally a pnpm issue, so I'm not sure if we should include setup details for external libraries like Prettier or ESLint. Providing useful information is important, but we should also avoid making the documentation overly lengthy. I'd appreciate hearing other members' thoughts.
I totally agree with you 👍😊! Because my intention is just to help others by having some information about this. Because I spent quite some time trying to understand why my Eslint failed 😅. |
📝 Description
Updated Hoisted dependencies step in installation.mdx.
Added extra information about hoisted pnpm packages. Because without prior knowledge about hoisting you may end up with broken Prettier and EsLint. Read more here: pnpm/pnpm#8878
⛳️ Current behavior (updates)
Docs don't inform new users that their Prettier and EsLint may stop working because of how Pnpm and hoisting works.
🚀 New behavior
Now the user will have the information needed to prevent non-working Prettier and EsLint.
💣 Is this a breaking change (Yes/No): No
Summary by CodeRabbit
pnpm
configuration.pnpm
.