Repository navigation
Run tests in CI and configure unicorn/prefer-query-selector - #44
Merged
Merged
Conversation
Add a `pnpm test` step to the pull request and push workflows. The test suite flagged unicorn/prefer-query-selector, which gained an `allowWithVariables` option in oxlint 1.88.0; set it to false (flag every getElementById/getElementsByClassName call). oxlint 1.83-1.87 reject any options on that rule, so raise the oxlint peer dependency floor to ^1.88.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLBzrsN4hMwi77PvoAzqq8
bachmacintosh
marked this pull request as ready for review
October 16, 2026 21:12
bachmacintosh
enabled auto-merge
October 16, 2026 21:12
The rule tests shell out to `oxlint --rules`, which loads the repo's oxlint.config.ts and therefore needs the built dist/ output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLBzrsN4hMwi77PvoAzqq8
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.
Summary
Run Tests(pnpm test) step to bothpr.ymlandpush.yml, right afterBuild Package. It has to come after the build: the rule tests runoxlint --rules, which loads the repo'soxlint.config.ts, and that file imports the builtdist/oxlint/index.mjs.unicorn/prefer-query-selector: oxlint 1.88.0 added anallowWithVariablesoption to this rule, and the rule-settings test failed because we didn't set it. It's now set to["error", { allowWithVariables: false }], so everygetElementById()/getElementsByClassName()call is flagged, including ones that take a variable. The oxlint README was regenerated withpnpm build:docs.^1.83.0→^1.88.0: oxlint 1.83 through 1.87 refuse to load a config that gives this rule any options ("This rule does not accept configuration options"), evenfalse. I checked the schemas for 1.83.0 through 1.88.0 and ran 1.83.0 against the config. Consumers on those versions would get a config parse error, so the floor moves up.That was the only failing test. Every other rule's settings already match oxlint 1.88.0's schema.
Testing
All of these passed locally, starting from a clean checkout with no
dist/, in CI order:pnpm build,pnpm test(2718 tests),pnpm typecheck,pnpm build:docs(no other generated changes),pnpm format:check,pnpm lint.🤖 Generated with Claude Code
https://claude.ai/code/session_01TLBzrsN4hMwi77PvoAzqq8