Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `biome-ci` | Check formatting, check if imports are organized, and lints (same rules as `biome-check`, but read-only) |
| `biome-ci` | Check formatting, check if imports are organized, and lints (similar to `biome-check`, check the [documentation](https://biomejs.dev/recipes/continuous-integration/#biome-check-vs-biome-ci) for more information. ) |

Copy link
Copy Markdown
Author

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?

Suggested change
| `biome-ci` | Check formatting, check if imports are organized, and lints (same rules as `biome-check`, but read-only) |
| `biome-ci` | Check formatting, check if imports are organized, and lints (similar to `biome-check` but read-only, check the [documentation](https://biomejs.dev/recipes/continuous-integration/#biome-check-vs-biome-ci) for more information.) |

Copy link
Copy Markdown
Member

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"?

Copy link
Copy Markdown
Author

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"?

Copy link
Copy Markdown
Member

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

| `biome-check` | Format, organize imports, lint, and apply safe fixes to the committed files (same results as `biome-format` + `biome-lint`) |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `biome-check` | Format, organize imports, lint, and apply safe fixes to the committed files (same results as `biome-format` + `biome-lint`) |
| `biome-check` | Format, check assist actions and lint rules, and apply safe fixes to the committed files |

Again, they are not the same. What about this suggestion?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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:

  • ci -> fails if any violation in formatting or linting
  • check -> fixes all formatting and linting violations
  • format -> reformat files
  • lint -> fix linting violations

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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/

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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`:
Expand Down