colinhacks / zod

TypeScript-first schema validation with static type inference
https://zod.dev
MIT License
33.09k stars 1.15k forks source link

CI lint checks can be simplified #3660

Open zirkelc opened 2 months ago

zirkelc commented 2 months ago

Hi,

I was looking through the v4 branch and I noticed in your GitHub workflow that you run these two script as part of your lint job:

https://github.com/colinhacks/zod/blob/5a3b5f3d966f4ae654f2f18076aa6b0ccc51f18a/.github/workflows/test.yml#L47-L48

The scripts are defined like this:

https://github.com/colinhacks/zod/blob/5a3b5f3d966f4ae654f2f18076aa6b0ccc51f18a/package.json#L49-L52

The biome check command actually combines lint and format:

biome check Runs formatter, linter and import sorting to the requested files. Usage: biome check [--write] [--unsafe] [--staged] [--changed] [--since=REF] [PATH]…

https://biomejs.dev/reference/cli/#biome-check

So lint:check could actually be removed from the lint job.

Furthermore, there is also a biome ci command:

biome ci Command to use in CI environments. Runs formatter, linter and import sorting to the requested files. Files won’t be modified, the command is a read-only operation. Usage: biome ci [--formatter-enabled=<true|false>] [--linter-enabled=<true|false>] [--organize-imports-enabled=<true|false>] [--changed] [--since=REF] [PATH]…

So if you have the *:check scripts are only needed for CI, they could be replaced by using biome ci.