-
-
Notifications
You must be signed in to change notification settings - Fork 8
Clarify descriptions of biome pre-commit hooks #102
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,12 +8,12 @@ The following section assumes that you [installed pre-commit](https://pre-commit | |||||
|
|
||||||
| Biome provides four hooks: | ||||||
|
|
||||||
| | hook `id` | description | | ||||||
| | -------------- | --------------------------------------------------------------------------- | | ||||||
| | `biome-ci` | Check formatting, check if imports are organized, and lints | | ||||||
| | `biome-check` | Format, organize imports, lint, and apply safe fixes to the committed files | | ||||||
| | `biome-format` | Format the committed files | | ||||||
| | `biome-lint` | Lint and apply safe fixes to the committed files | | ||||||
| | hook `id` | description | | ||||||
| | -------------- | --------------------------------------------------------------------------------------------------------------------------- | | ||||||
| | `biome-ci` | Check formatting, check if imports are organized, and lints (same rules as `biome-check`, but read-only) | | ||||||
| | `biome-check` | Format, organize imports, lint, and apply safe fixes to the committed files (same results as `biome-format` + `biome-lint`) | | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Again, they are not the same. What about this suggestion?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does "check assist actions" mean? The idea of saying "same as format+lint" is not about saying that's exactly the same, but saying that if you need both you should use this and not the other two (or maybe I still need further clarifications?). Maybe instead of editing the Description column, I should add an extra column "behavior" or something, like this:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, check does more than format and lint. format + lint != check Assist actions: https://biomejs.dev/assist/
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah that wasn't clear until now for me |
||||||
| | `biome-format` | Format the committed files | | ||||||
| | `biome-lint` | Lint and apply safe fixes to the committed files | | ||||||
|
|
||||||
| For example, if you want to use the `biome-check` hook, | ||||||
| add the following pre-commit configuration to the root of your project in a file named `.pre-commit-config.yaml`: | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the main point is to insist on the "will not edit the files" part. The link to the doc is a very good idea, but I'd still explicitly put "read-only" somewhere. WDYT about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the point is the to have read-only highlighted, can we drop the "similar to biome-check"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this a "read-only biome check"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you miss my comment? #102 (comment) Check the link