test(linter/plugins): conformance tests parse as TSX where specified#16713
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this comment.
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.langto "tsx" whenecmaFeatures.jsx === true, otherwise defaults to "ts" - Fixes 5 conformance test failures (1 in
no-unused-expressions, 4 inno-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.
Merge activity
|
…16713) Parse test cases as TSX where parser is specified as `@typescript-eslint/parser`, and `parserOptions.ecmaFeatures.jsx === true`.
d432e70 to
6832464
Compare
c0315f4 to
fe372de
Compare

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