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

Remove prettier from pre-commit #174

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

brian-rose
Copy link
Member

As suggested by @dopplershift, due to the continued aggravation of pre-commit opening PRs that include pre-release alpha versions of prettier, this PR just removes prettier entirely from our pre-commit config.

Copy link

github-actions bot commented May 21, 2024

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below.
🔍 Git commit SHA: c43c836
✅ Deployment Preview URL: https://ProjectPythia.github.io/cookbook-template/_preview/174

@brian-rose
Copy link
Member Author

Other repos that suffer from the same issue include

@brian-rose
Copy link
Member Author

@dopplershift are you aware of any issue tracking the problem with pre-commit and prettier releases that we can link here?

It would be great to get the functionality of prettier back once the headaches are resolved.

@dopplershift
Copy link

Let's just say upstream is less than interested about doing anything about this. "Working as intended" was one phrase I saw. 🙄

@dopplershift
Copy link

For the record, an attitude like that from upstream (not the first time I've seen it) has me reconsidering future use of pre-commit in my projects.

@brian-rose
Copy link
Member Author

Good to know that there's essentially zero chance of an upcoming change in how pre-commit handles these cases.

Are we happy with the compromise of just removing prettier from the pre-commit list, and thus losing its functionality? Here and in several other of our repos?

@brian-rose
Copy link
Member Author

There might be a viable alternative: keep using prettier, but exclude it from auto-updates (and thus need to manually update its version in .pre-commit-config.yaml when we are ready to upgrade.

If I'm interpreting these docs correctly, we should be able to do this just by adding this block to .pre-commit-config.yaml:

ci:
    skip: [prettier]

@dopplershift does that sound correct?

@dopplershift
Copy link

@brian-rose My read of those docs implies that this will only skip running prettier on the pre-commit CI service, not disable updating the version. I can find no way to dial back updates, only ways to store hashes for versions or use "bleeding edge": https://pre-commit.com/#pre-commit-autoupdate

@dopplershift
Copy link

@dcamron and I have also found that currently precommit-ci is only set to run on 7 of our own repositories, not any of the cookbook repos (and currently that list would have to be added to manually rather than having "all repositories" set). I think we need to think a little more about what we want the user experience to be, both locally and on GitHub.

@dcamron
Copy link
Contributor

dcamron commented Jun 26, 2024

Closes #186

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.

Working from branches on this repo creates confusion
3 participants