Skip to content

test(linter/plugins): add tests for sourceType in RuleTester#16670

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-09-test_linter_plugins_add_tests_for_sourcetype_in_ruletester_
Dec 9, 2025
Merged

test(linter/plugins): add tests for sourceType in RuleTester#16670
graphite-app[bot] merged 1 commit intomainfrom
12-09-test_linter_plugins_add_tests_for_sourcetype_in_ruletester_

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Dec 9, 2025

Follow-on after #16660. Add tests for languageOptions.sourceType in RuleTester.

Copy link
Copy Markdown
Member Author


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 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 Dec 9, 2025
@overlookmotel overlookmotel marked this pull request as ready for review December 9, 2025 23:14
Copilot AI review requested due to automatic review settings December 9, 2025 23:14
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 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.

@overlookmotel overlookmotel self-assigned this Dec 9, 2025
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 9, 2025
Copy link
Copy Markdown
Member Author

overlookmotel commented Dec 9, 2025

Merge activity

)

Follow-on after #16660. Add tests for `languageOptions.sourceType` in `RuleTester`.
@graphite-app graphite-app bot force-pushed the 12-09-test_linter_plugins_add_tests_for_sourcetype_in_ruletester_ branch from b800e3d to 0f2e648 Compare December 9, 2025 23:28
@graphite-app graphite-app bot merged commit 0f2e648 into main Dec 9, 2025
18 checks passed
@graphite-app graphite-app bot deleted the 12-09-test_linter_plugins_add_tests_for_sourcetype_in_ruletester_ branch December 9, 2025 23:34
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 9, 2025
graphite-app bot pushed a commit that referenced this pull request Dec 9, 2025
…ester` (#16671)

Follow-on after #16660. Add 1 more test that I missed in #16670.
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
)

Follow-on after #16660. Add tests for `languageOptions.sourceType` in `RuleTester`.
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
…ester` (#16671)

Follow-on after #16660. Add 1 more test that I missed in #16670.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…-project#16670)

Follow-on after oxc-project#16660. Add tests for `languageOptions.sourceType` in `RuleTester`.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
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