chore: make the lint gate green and actually run it - #33
Merged
Conversation
`pnpm lint` has been red for some time with auto-fixable prettier errors. It went unnoticed because ci.yml, which runs lint, only triggers on pull requests to `main` while the default branch is `master`, and release.yml has its lint step commented out -- so nothing ever ran it. Whitespace only, produced by `pnpm lint --fix`. No behaviour change, though the non-minified bundles pick up the reformatting, hence the version bump.
husky 9 printed a DEPRECATED warning on every single commit and states these two lines will fail outright on v10. Hooks are invoked directly by husky 9, so the shebang and the `_/husky.sh` source are both redundant. Verified by committing with it removed: the hook still runs every check and the warning is gone.
ci.yml triggered only on pull requests to `main`, but the default branch is `master` and no `main` exists -- so typecheck, lint and test have never run on any pull request. quality-checks.yml already targets both branches; this matches it.
Commented out at some point and never restored, which is half the reason lint rot went unnoticed. `pnpm lint` is clean again as of the preceding commit, so the step passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The three loose ends from #30/#31, and the reason they went unnoticed for so long.
The through-line
pnpm linthas been red on master. Nothing caught it, because the lint gate never ran:ci.yml— the workflow that runstypecheck,lintandtest— triggers only on pull requests tomain. The default branch ismasterand nomainbranch exists, so it has never run on any PR. That is also why themakeAddressBooktypecheck error from fix(carddav): honour fetch override in makeAddressBook #31 sat on master unnoticed.release.ymlhad itslintstep commented out.So the only workflow that actually ran was
quality-checks.yml, which does not lint.Changes
style: apply prettier to the last lint holdoutspnpm lint --fix. Whitespace only across 4 files.chore(hooks): drop deprecated husky v8 preamble_/husky.shsource.ci: run CI on pull requests to masterbranches: [main]→[master, main], matching quality-checks.yml.ci: re-enable lint in the release workflowpnpm lintnow reports 0 errors, and two workflows will actually enforce it.The husky change is verified rather than assumed: the three commits after it were made with the preamble removed, and the hook still ran every check — signature scan, version check, dist rebuild — with the DEPRECATED warning gone.
The prettier pass is whitespace only, but the non-minified bundles pick up the reformatting, so
dist/is rebuilt and the patch version bumped. The dist diff is generated; the CI gate verifies it.Why stacked on #32
Basing this on
masterproduces a genuine merge conflict with #32. Both branches rewrite the same lines ofclient.ts: prettier collapses the six long single-lineDAVClienttodo methods into multi-line form, and #32 rewrites those same lines into multi-line form plus afetch: this.fetchOverrideentry. Two different rewrites of the same region — git cannot auto-merge them. I confirmed this by building the branch both ways.Stacking avoids it:
lint --fixruns against the post-#32 tree, where 6 of the 10 errors are already gone as a side effect of that PR, leaving only the 4 genuinely-formatting ones. Merge #32 first and this applies cleanly. If you would rather have it offmaster, say so and I will re-cut it — that just means #32 rebases instead.Verification
Workflow triggers after the change:
Note
ci.ymlwill now run for real for the first time, on this PR and every future one. It runspnpm testacross Node 18/20/22/24 with mocked fetch. If it turns up something that has been failing invisibly on a Node version I have not exercised locally (I am on 22,.nvmrcsays 24), that is the gate doing its job rather than a regression from this PR — tell me and I will fix it separately.CI status on this PR
This PR shows 0 checks, and that is expected:
quality-checks.ymltriggers onpull_request: branches: [master, main], so it does not fire for a PR targetingfix/todo-fetch-override. Once #32 merges and GitHub retargets this tomaster, the workflow will run.Until then the gates were run locally against this exact tree:
pnpm lint0 errors,pnpm typecheckclean, 42/42 tests, and the dist gate (pnpm buildthengit diff dist/) reproduces the committed build.