Skip to content

Move Prettier formatting to root #1225

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

Merged
merged 11 commits into from
Mar 29, 2024
Merged

Move Prettier formatting to root #1225

merged 11 commits into from
Mar 29, 2024

Conversation

dotNomad
Copy link
Collaborator

@dotNomad dotNomad commented Mar 27, 2024

Now that most directories handle Prettier formatting well we can move the Prettier formatting to the root of the repo, using Prettier across all of the files.

This removes the format, check-format Just targets and npm scripts in our individual NPM packages and moves all of that up to the root.

Additionally this PR introduces husky and lint-staged to the root package.json to setup a Git commit hook which will automatically run Prettier for you.

To set that up all you have to do is run npm install or just npm-install at the root dir.

Prettier's VSCode extension is also added to the recommend extensions for the repo.

Intent

Part of #1030

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

See the Turbo with-npm example for the inspiration for moving Prettier to the root: https://github.com/vercel/turbo/tree/main/examples/with-npm

Copy link
Collaborator

@sagerb sagerb left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@dotNomad dotNomad force-pushed the dotnomad/root-prettier branch from fec44c8 to e17935d Compare March 29, 2024 18:42
@dotNomad dotNomad merged commit 4f9d772 into main Mar 29, 2024
@dotNomad dotNomad deleted the dotnomad/root-prettier branch March 29, 2024 18:55
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.

2 participants