Skip to content

test(linter/plugins): add types test for VisitorObject#20066

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-06-test_linter_plugins_add_types_test_for_visitorobject_
Mar 6, 2026
Merged

test(linter/plugins): add types test for VisitorObject#20066
graphite-app[bot] merged 1 commit intomainfrom
om/03-06-test_linter_plugins_add_types_test_for_visitorobject_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 6, 2026

Add a types test for #20065. This is a separate PR as it depends on strict: true TS config option added in #19675.

Copy link
Member Author

overlookmotel commented Mar 6, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Mar 6, 2026
@overlookmotel overlookmotel marked this pull request as ready for review March 6, 2026 09:38
@overlookmotel overlookmotel requested a review from camc314 as a code owner March 6, 2026 09:38
Copilot AI review requested due to automatic review settings March 6, 2026 09:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a TypeScript type-level regression test around the VisitorObject typings (related to #20065), relying on the stricter TS configuration enabled in #19675.

Changes:

  • Add a new visitor.test-d.ts type assertion file for VisitorObject assignability cases.
  • Add @type-challenges/utils as a dev dependency to express compile-time assertions.
  • Update pnpm-lock.yaml to include the new dependency.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pnpm-lock.yaml Locks @type-challenges/utils@0.1.1 for the workspace.
apps/oxlint/package.json Adds @type-challenges/utils to enable type-level assertions.
apps/oxlint/src-js/visitor.test-d.ts Introduces type-level cases intended to validate VisitorObject typing.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@overlookmotel overlookmotel force-pushed the om/03-06-test_linter_plugins_add_types_test_for_visitorobject_ branch from 42f72c3 to 63ddbdb Compare March 6, 2026 11:42
@overlookmotel overlookmotel force-pushed the 02-24-chore_apps_oxlint_enable_typescript_strict_option branch from 4495ed1 to e199f2d Compare March 6, 2026 14:37
@overlookmotel overlookmotel force-pushed the om/03-06-test_linter_plugins_add_types_test_for_visitorobject_ branch from 63ddbdb to 8ee5a16 Compare March 6, 2026 14:37
@overlookmotel overlookmotel force-pushed the om/03-06-test_linter_plugins_add_types_test_for_visitorobject_ branch from 8ee5a16 to f88a63f Compare March 6, 2026 15:37
@overlookmotel overlookmotel force-pushed the 02-24-chore_apps_oxlint_enable_typescript_strict_option branch from e199f2d to 9904a4a Compare March 6, 2026 15:37
@overlookmotel overlookmotel requested a review from Copilot March 6, 2026 15:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@graphite-app graphite-app bot force-pushed the 02-24-chore_apps_oxlint_enable_typescript_strict_option branch 2 times, most recently from 9100c63 to cce88d5 Compare March 6, 2026 16:09
@graphite-app graphite-app bot force-pushed the om/03-06-test_linter_plugins_add_types_test_for_visitorobject_ branch from f88a63f to e4f3e09 Compare March 6, 2026 16:09
@overlookmotel overlookmotel force-pushed the 02-24-chore_apps_oxlint_enable_typescript_strict_option branch from cce88d5 to a7ff967 Compare March 6, 2026 16:17
@overlookmotel overlookmotel force-pushed the om/03-06-test_linter_plugins_add_types_test_for_visitorobject_ branch from e4f3e09 to cd83465 Compare March 6, 2026 16:17
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Mar 6, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 6, 2026

Merge activity

Add a types test for #20065. This is a separate PR as it depends on `strict: true` TS config option added in #19675.
@graphite-app graphite-app bot force-pushed the 02-24-chore_apps_oxlint_enable_typescript_strict_option branch from a7ff967 to e255fcd Compare March 6, 2026 17:30
@graphite-app graphite-app bot force-pushed the om/03-06-test_linter_plugins_add_types_test_for_visitorobject_ branch from cd83465 to aacfef4 Compare March 6, 2026 17:30
Base automatically changed from 02-24-chore_apps_oxlint_enable_typescript_strict_option to main March 6, 2026 17:37
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 6, 2026
@graphite-app graphite-app bot merged commit aacfef4 into main Mar 6, 2026
20 checks passed
@graphite-app graphite-app bot deleted the om/03-06-test_linter_plugins_add_types_test_for_visitorobject_ branch March 6, 2026 17:38
graphite-app bot pushed a commit that referenced this pull request Mar 9, 2026
Rename tokens type tests file to `.test-d.ts`, following the pattern set by #20066.
graphite-app bot pushed a commit that referenced this pull request Mar 9, 2026
…20155)

Remove `noUnusedLocals` option from `tsconfig.json` files. It's redundant, as Oxlint `no-unused-vars` covers this for us.

It's an annoyance to have `noUnusedLocals` enabled, as in VS Code TypeScript complains about unused vars, even if they're prefixed with `_`.

Removing this option allows simplifying type tests added in #20066. Only reason these types had to be exported was to stop TS complaining that they were unused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants