Skip to content

test(linter/plugins): add test for options in overrides#16357

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-01-test_linter_plugins_add_test_for_options_in_overrides
Dec 1, 2025
Merged

test(linter/plugins): add test for options in overrides#16357
graphite-app[bot] merged 1 commit intomainfrom
12-01-test_linter_plugins_add_test_for_options_in_overrides

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 1, 2025

Follow-on after #16215. Test that options can be set in overrides.

Copy link
Member Author

overlookmotel commented Dec 1, 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 A-linter Area - Linter A-cli Area - CLI C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Dec 1, 2025
@overlookmotel overlookmotel marked this pull request as ready for review December 1, 2025 19:33
Copilot AI review requested due to automatic review settings December 1, 2025 19:33
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 adds test coverage for setting rule options in the overrides section of oxlint configuration files, following up on PR #16215. The test verifies that when a file matches an override pattern, it receives the overridden options rather than the base configuration options.

Key Changes

  • Adds a new test file in a nested directory to trigger the overrides configuration
  • Extends the oxlint configuration with an overrides section that applies different options to files matching a specific pattern
  • Updates the snapshot to verify that the overridden options are correctly applied

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
apps/oxlint/test/fixtures/options/.oxlintrc.json Adds overrides section targeting files/nested/** with custom options for options-plugin/options rule
apps/oxlint/test/fixtures/options/files/nested/index.js New test file that matches the override pattern
apps/oxlint/test/fixtures/options/output.snap.md Updates snapshot to include expected output for the nested file showing overridden options, increasing error count from 3 to 6 and file count from 1 to 2

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

@overlookmotel overlookmotel self-assigned this Dec 1, 2025
@overlookmotel overlookmotel added the A-linter-plugins Area - Linter JS plugins label Dec 1, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 1, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 1, 2025

Merge activity

Follow-on after #16215. Test that options can be set in overrides.
@graphite-app graphite-app bot force-pushed the 12-01-test_linter_plugins_add_test_for_options_in_overrides branch from afb9fed to 8bbf2eb Compare December 1, 2025 19:41
@graphite-app graphite-app bot merged commit 8bbf2eb into main Dec 1, 2025
18 checks passed
@graphite-app graphite-app bot deleted the 12-01-test_linter_plugins_add_test_for_options_in_overrides branch December 1, 2025 19:47
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 1, 2025
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