-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Suggestion: move pre-commit support to another repo #8925
Comments
We don't have |
I think you have something wrong with your |
You do have support for |
I think this a good idea. |
Maybe we can just import https://github.com/awebdeveloper/pre-commit-prettier to prettier/pre-commit |
I think https://github.com/awebdeveloper/pre-commit-prettier setup is not ideal because the version handling is not "native". You have to do: - repo: https://github.com/awebdeveloper/pre-commit-prettier
rev: "master"
hooks:
- id: prettier
additional_dependencies: ["[email protected]"] What I am suggesting is a repo that follows the main repo in terms of tags / versions (at least for the releases to npm). So that we could do: - repo: https://github.com/prettier/pre-commit
rev: "2.0.5"
hooks:
- id: prettier I can work on the repo (under a day, it should be pretty simple), and you shall decide if you integrate it in the prettier organization (I wouldn't want to take ownership of it personally). |
Just clarify, does |
oh, it is weird, why do not use packages npm register? It is not working with |
@FloChehab One off topic question, do you know is this change safe? Is it okay to remove |
I think I found something https://pre-commit.com/#node |
@fisker yep, I think we need to rewrite docs, because using master is really bad idea, it can be unstable between commits |
Unfortunately this is not the way |
@fisker I'll have a look tonight ! :) |
Great appreciate! |
Also, the main point of this issue, is actually that "old" tags are also unstable for pre-commit. |
I wonder if this the main reason we support |
Seems there is a tool for this https://github.com/pre-commit/pre-commit-mirror-maker |
Nice ; so it should be even easier. At the end, I think the final repo should look like https://github.com/pre-commit/mirrors-jshint . |
So there might be discussions regarding under which github organization it might end up. |
I prefer it under @prettier, @evilebottnawi what do you think? |
make sense |
Thanks @fisker & @evilebottnawi for the fast action / decision making ! I'll test the new repo setup in few hours ; and I'll make feedbacks there. |
Let's keep this open, until prettier/pre-commit is stable and we can remove Let's move discuss to prettier/pre-commit#1 |
I think I've done setting up https://github.com/prettier/pre-commit. How do we notify people migrate to the new repo? Something like this? - id: prettier
name: prettier
entry: echo prettier support for pre-commit have been moved to https://github.com/prettier/pre-commit, please checkout the new repository. && exit 1 |
You can go for: - id: prettier
name: prettier
entry: Prettier support for pre-commit have been moved to https://github.com/prettier/pre-commit, please checkout the new repository.
language: fail
pass_filenames: false EDIT: added |
Thank you, I'll try. |
Great, it works, I tested on CI https://github.com/prettier/pre-commit/pull/6/checks?check_run_id=957631819#step:7:21 Do you want send a PR for this? .pre-commit-hooks.yaml I used for test |
Sure, I'll do it ; we will need to also update prettier's documentation. |
Thanks! |
* Make current hook fail, * Updated docs to reflect the change. Closes prettier#8925
Per prettier/prettier#8925 prettier has created a new pre-commit repository for pre-commit integration. This repository also uses a slightly different tag format. Lastly, we're updating to the latest version version available at this time Adds a .prettierignore to keep it from reformatting the jenkins-init-scripts/README that shouldn't be touched Change-Id: I0a50fc4fc372f43c6cd323aa1d6a2ec2054aeeda Signed-off-by: Andrew Grimberg <[email protected]>
Hi,
First of all, thanks for the awesome tool, I have been using for a couple of years and have never been disappointed ! :)
This issue is more a of a question / suggestion, so sorry if it doesn't fit in the standard issue schema.
Context
I am currently using
prettier
to format files not related to JavaScript through the https://pre-commit.com/ integration. Because (from what I understand)pre-commit
runsnpm i .
it's pretty slow and bandwidth intensive on this repo (takes around 40-50s to set up in our CI environment).The other issue is that sometimes, sub-dependencies of
prettier
are broken (like today, see the error below - v2.0.5).By looking at the npm page I see that
prettier
is actually a standalone package: https://www.npmjs.com/package/prettier ; and doingnpm i [email protected]
takes actually less than 1 second, which is pretty great 🎉 .So here is my suggestion:
Could it be possible to move the 'official' support of
pre-commit
to another git repo, that would have a simplepackage.json
with onlyprettier
and the same hook file as https://github.com/prettier/prettier/blob/master/.pre-commit-hooks.yaml ?This would
I have currently switched to https://github.com/awebdeveloper/pre-commit-prettier which is kind of what I am suggesting, but without the native tag support.
Have a nice day !
Sub dependancies errors
The text was updated successfully, but these errors were encountered: