From 182ff7610729c7e887570806cfed8e1d984ac3e7 Mon Sep 17 00:00:00 2001 From: daquinoaldo <18645793+daquinoaldo@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:38:53 +0200 Subject: [PATCH] ci: enforce lint and formatting instead of silently fixing them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pnpm lint ran oxfmt in write mode and oxlint --fix, so CI rewrote an unformatted tree and passed: format and lint drift was never caught. Make lint non-mutating (oxfmt --check, plain oxlint) and add a fix script that runs everything lint does plus the auto-format and auto-fix passes. Document both in CONTRIBUTING. 🤖 Generated with [OpenCode](https://opencode.ai) (Smart-router) --- CONTRIBUTING.md | 5 ++++- package.json | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad5f5c3..f41e7b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,9 +10,12 @@ Contributions are welcome, but I have little time to invest in this project. I a # install dependencies pnpm install -# type checking and style fixes +# type checking and lint/format check (CI runs this) pnpm lint +# everything lint does, plus auto-format and auto-fix lint issues +pnpm fix + # run tests pnpm test ``` diff --git a/package.json b/package.json index 82119a8..aebeeb2 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ }, "scripts": { "build": "rm -rf dist && tsc --project tsconfig.build.esm.json && tsc --project tsconfig.build.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", - "lint": "oxfmt && oxlint --fix && knip && tsc --noEmit", + "fix": "oxfmt && oxlint --fix && knip && tsc --noEmit", + "lint": "oxfmt --check && oxlint && knip && tsc --noEmit", "test": "node --test-concurrency=1 --test test/*.test.ts", "prepack": "pnpm build", "preuninstall": "node dist/esm/certs-cli.js -u",