Skip to content

test(linter/plugins): conformance tests parse as TSX where specified#16713

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-10-test_linter_plugins_conformance_tests_parse_as_tsx_where_specified
Dec 10, 2025
Merged

test(linter/plugins): conformance tests parse as TSX where specified#16713
graphite-app[bot] merged 1 commit intomainfrom
12-10-test_linter_plugins_conformance_tests_parse_as_tsx_where_specified

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Dec 10, 2025

Parse test cases as TSX where parser is specified as @typescript-eslint/parser, and parserOptions.ecmaFeatures.jsx === true.

Copy link
Copy Markdown
Member Author

overlookmotel commented Dec 10, 2025


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.

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Dec 10, 2025
@overlookmotel overlookmotel marked this pull request as ready for review December 10, 2025 18:29
Copilot AI review requested due to automatic review settings December 10, 2025 18:29
@overlookmotel overlookmotel self-assigned this Dec 10, 2025
Copy link
Copy Markdown
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 fixes parsing of JSX code in TypeScript conformance tests by detecting when @typescript-eslint/parser is used with JSX enabled and setting the language to "tsx" instead of "ts".

  • Conditionally sets parserOptions.lang to "tsx" when ecmaFeatures.jsx === true, otherwise defaults to "ts"
  • Fixes 5 conformance test failures (1 in no-unused-expressions, 4 in no-use-before-define)

Reviewed changes

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

File Description
apps/oxlint/conformance/src/rule_tester.ts Modified modifyTestCase to check ecmaFeatures.jsx flag and set language to "tsx" or "ts" accordingly
apps/oxlint/conformance/snapshot.md Updated test results showing 5 additional passing tests (from 28660 to 28665) and corresponding failure reduction

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

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 10, 2025
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Dec 10, 2025

Merge activity

…16713)

Parse test cases as TSX where parser is specified as `@typescript-eslint/parser`, and `parserOptions.ecmaFeatures.jsx === true`.
@graphite-app graphite-app bot force-pushed the 12-10-fix_linter_plugins_do_not_escape_tab_or_cr_in_test_case_names_in_ruletester_ branch from d432e70 to 6832464 Compare December 10, 2025 18:53
@graphite-app graphite-app bot force-pushed the 12-10-test_linter_plugins_conformance_tests_parse_as_tsx_where_specified branch from c0315f4 to fe372de Compare December 10, 2025 18:53
Base automatically changed from 12-10-fix_linter_plugins_do_not_escape_tab_or_cr_in_test_case_names_in_ruletester_ to main December 10, 2025 18:59
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 10, 2025
@graphite-app graphite-app bot merged commit fe372de into main Dec 10, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 12-10-test_linter_plugins_conformance_tests_parse_as_tsx_where_specified branch December 10, 2025 18:59
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