-
Notifications
You must be signed in to change notification settings - Fork 215
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
Prettier's pre-commit plugin is no longer maintained #4256
Comments
Seeing |
Maybe worth considering a change to https://github.com/typicode/husky and https://github.com/lint-staged/lint-staged instead of pre-commit. If we need to run prettier locally anyway, The best part of pre-commit are the isolated environments for each hook, and we can certainly do that ourselves if we like. But combined with a PDM dependencies configuration at the root pyproject.toml, we could just as easily run all the tools we use in the monorepo with either @dhruvkb as our repository devex tooling aficionado... what do you think? Edit: This is actually a terrible idea, I think. If the main benefit is simplifying the pre-commit configuration, we can do that trivially by (a) requiring PDM for Openverse development, and (b) using a monorepo root-level pyproject.toml to install and configure pre-commit: [tool.pdm.dev-dependencies]
dev = [
"pre-commit",
] And add No need to download the .pyz, no need to worry about system Python at all. PDM is easy to install and it manages Python distributions too, so we can use whatever Python version we want. As far as this particular issue with prettier goes, we'd just take |
I've unassigned myself from this because I haven't had time to directly work on it since the sprint to get I still like the idea to start running prettier directly in the execution environment. We'll want to make sure it's always available in @dhruvkb any opinions here? |
I agree with your most recent comment and think that going the way of ESLint would be ideal. It'll be an extension of a practice that we've already determined to work well. We can add Prettier and its plugins as dev dependencies in the root openverse/.pre-commit-config.yaml Lines 126 to 132 in 6dbbe5e
As an added bonus, we also won't have to manually sync the package versions between the |
Perfect, exactly what I had in mind 🚀 |
I was going to update the PR description to specify how to do this, but it was just as much work as actually just doing it. So PR is here now for this: #4749 |
Current Situation
See the note here: https://github.com/pre-commit/mirrors-prettier?tab=readme-ov-file#archived
Suggested Improvement
Find a new way to run prettier on pre-commit (probably locally?)
Benefit
Not using an unmaintained piece of software
Additional context
The text was updated successfully, but these errors were encountered: