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

Create tags so people can use pre-commit autoupdate #7

Closed
flying-sheep opened this issue Aug 23, 2024 · 3 comments · Fixed by #19
Closed

Create tags so people can use pre-commit autoupdate #7

flying-sheep opened this issue Aug 23, 2024 · 3 comments · Fixed by #19

Comments

@flying-sheep
Copy link
Contributor

There are two ways in which people use tools like biome:

  1. A locally installed tool version (i.e. they manage the install environment themselves, e.g. using yarn or npm)

  2. Using pre-commit’s environment management to install the tool version

    This variant is particularly useful for projects that don’t use a JS environment themselves, e.g. Python projects.

The second use case integrates nicely with pre-commit autoupdate if the repo has tags matching the tool version.

Other pre-commit mirror repos show how it’s done, and the pyproject.toml for this repo would look like this:

{
    "name": "@biomejs/pre-commit",
    "description": "Biome pre-commit node package",
    "version": "1.8.3",
    "dependencies": {"@biomejs/biome": "1.8.3"}
}

The two mentions of 1.8.3 would be updated by a workflow like in other mirror repos.

People who want to use a locally installed version of biome could use the instructions mentioned here: https://github.com/biomejs/pre-commit?tab=readme-ov-file#using-biome-with-a-local-pre-commit-hook

@ematipico
Copy link
Member

PRs are welcome

@Freed-Wu
Copy link

Freed-Wu commented Jan 1, 2025

Any progress?

@yxtay
Copy link
Contributor

yxtay commented Feb 3, 2025

A few different approach done by other pre-commit hooks.

Using python script to update the versions and tag.
https://github.com/ComPWA/prettier-pre-commit
https://github.com/ComPWA/taplo-pre-commit
https://github.com/astral-sh/uv-pre-commit

Using pre-commit-mirror CLI. Probably not relevant as there are multiple entries of pre-commit hooks for biomejs
https://github.com/ComPWA/pyright-pre-commit/

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 a pull request may close this issue.

4 participants