test(linter/plugins): add tests for sourceType in RuleTester#16670
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 adds comprehensive test coverage for the languageOptions.sourceType option in RuleTester, following up on PR #16660. The tests verify that sourceType configuration works correctly at different levels (global, RuleTester instance, and individual test case) and validates the interaction between sourceType values and the eslintCompat mode.
Key Changes
- Added tests for all valid sourceType values: "module", "script", "commonjs", and "unambiguous"
- Verified that sourceType can be set at global, RuleTester, and test case levels with proper precedence
- Tested error handling for incompatible sourceType/eslintCompat combinations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
) Follow-on after #16660. Add tests for `languageOptions.sourceType` in `RuleTester`.
b800e3d to
0f2e648
Compare
) Follow-on after #16660. Add tests for `languageOptions.sourceType` in `RuleTester`.
…-project#16670) Follow-on after oxc-project#16660. Add tests for `languageOptions.sourceType` in `RuleTester`.
…ester` (oxc-project#16671) Follow-on after oxc-project#16660. Add 1 more test that I missed in oxc-project#16670.

Follow-on after #16660. Add tests for
languageOptions.sourceTypeinRuleTester.