Skip to content

test(linter/plugins): improve internal types#18342

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/01-21-test_linter_plugins_improve_internal_types
Jan 21, 2026
Merged

test(linter/plugins): improve internal types#18342
graphite-app[bot] merged 1 commit intomainfrom
om/01-21-test_linter_plugins_improve_internal_types

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 21, 2026

Pure refactor.

  1. Add a ParserOptionsInternal type which bridges between LanguageOptionsInternal and EcmaFeaturesInternal.
  2. Reuse LanguageOptionsInternal type in conformance tests, rather than redefining the same type again.

@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 Jan 21, 2026
Copy link
Member Author

overlookmotel commented Jan 21, 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 hot fixes, skip the queue and merge this PR next

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.

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

This PR refactors internal type definitions to improve type safety and reduce code duplication in the linter plugin testing infrastructure. It introduces a ParserOptionsInternal type that bridges between LanguageOptionsInternal and EcmaFeaturesInternal, and consolidates duplicate type definitions across conformance test files.

Changes:

  • Added ParserOptionsInternal type to properly extend ParserOptions with EcmaFeaturesInternal
  • Exported and extended LanguageOptionsInternal to use ParserOptionsInternal
  • Removed duplicate type definitions in conformance tests by reusing the exported types

Reviewed changes

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

File Description
apps/oxlint/src-js/package/rule_tester.ts Added ParserOptionsInternal interface, exported LanguageOptionsInternal, and removed unnecessary type casting
apps/oxlint/conformance/tester.ts Replaced local type definitions with imported LanguageOptionsInternal and renamed ExtraCaseProps to TestCaseExtension
apps/oxlint/conformance/src/rule_tester.ts Removed duplicate LanguageOptionsInternal definition and imported/re-exported from main rule tester

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel overlookmotel self-assigned this Jan 21, 2026
@overlookmotel overlookmotel removed the request for review from camc314 January 21, 2026 12:08
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 21, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 21, 2026

Merge activity

Pure refactor.

1. Add a `ParserOptionsInternal` type which bridges between `LanguageOptionsInternal` and `EcmaFeaturesInternal`.
2. Reuse `LanguageOptionsInternal` type in conformance tests, rather than redefining the same type again.
@graphite-app graphite-app bot force-pushed the om/01-21-fix_linter_plugins_allow_line_number_passed_to_report_to_be_1_over_line_count branch from 807618a to a3914fd Compare January 21, 2026 12:18
@graphite-app graphite-app bot force-pushed the om/01-21-test_linter_plugins_improve_internal_types branch from f0e9bd4 to 4497f3d Compare January 21, 2026 12:19
Base automatically changed from om/01-21-fix_linter_plugins_allow_line_number_passed_to_report_to_be_1_over_line_count to main January 21, 2026 12:24
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 21, 2026
@graphite-app graphite-app bot merged commit 4497f3d into main Jan 21, 2026
20 checks passed
@graphite-app graphite-app bot deleted the om/01-21-test_linter_plugins_improve_internal_types branch January 21, 2026 12:25
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.

2 participants