Skip to content
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

Ensure prettier is automatically set up for new developers #671

Open
josephjclark opened this issue Apr 19, 2024 · 0 comments · Fixed by #683
Open

Ensure prettier is automatically set up for new developers #671

josephjclark opened this issue Apr 19, 2024 · 0 comments · Fixed by #683
Labels
good first issue Good for newcomers

Comments

@josephjclark
Copy link
Collaborator

It's really important that prettier runs so that we have a consistent code style.

But new developers coming in to contribute to the repo may not have prettier configured.

My expectation is:

  • New users clone the repo
  • They run pnpm install
  • They edit a source file
  • Sometime between saving and commiting, prettier runs automatically and reformats the edit. Ideally on save, so that they can see it.

We may need to add documentation to the readme, but ideally this stuff should happen automatically.

I have my VSC setup to format on save, which uses prettier. But this won't work for other editing environments.

We should look at how prettier recommends this to be setup on their officlal pages and be guided by that.

I would prefer not to format pre-commit. The idea of changing code, invisibly, right before commit it to the repo, makes my blood run cold.

@josephjclark josephjclark added the good first issue Good for newcomers label Apr 19, 2024
River-unknown added a commit to River-unknown/kit that referenced this issue May 5, 2024
josephjclark pushed a commit that referenced this issue May 28, 2024
* #671: configured prettier

* Removed the pre-hook commit section and also minimized the Readme.md file

* also added test:lint or test:format script in package.json which can be run locally or in CI

* Delete ci.yaml

* Updated changes

* Update pnpm-lock.yaml

Resolved conflicts

* Update pnpm-lock.yaml

* Update package.json

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* changed the versions for consistency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Icebox
Development

Successfully merging a pull request may close this issue.

1 participant