Skip to content

Conversation

@MIreland
Copy link

@MIreland MIreland commented Dec 22, 2025

Written by Cursor!

The extends field in the configuration files does not currently extend ignorePatterns.

Reproducible here: https://github.com/MIreland/monorepo-filter-examples/blob/main/app/package-a/package.json#L10

Fixes a bug where `ignorePatterns` from extended configurations were not being merged.

Problem

The `merge` method in `oxlintrc.rs` was only using `self.ignore_patterns` and completely ignoring `other.ignore_patterns` from extended configs.

Solution

Updated the merge logic to combine ignore patterns from both the extended config (`other`) and the current config (`self`), following the same pattern used for `overrides` and `categories`.

Changes

  • Fixed merge logic to merge `ignore_patterns` from both configs
  • Added comprehensive test cases to verify the fix

Testing

  • All existing tests pass
  • New test `test_oxlintrc_ignore_patterns_merge` verifies the fix

Updated the merge logic in the Oxlintrc struct to combine ignore patterns from two configurations, ensuring that the patterns from the 'other' configuration take precedence. Added unit tests to verify the correct merging behavior of ignore patterns.
Copilot AI review requested due to automatic review settings December 22, 2025 20:08
@MIreland MIreland requested a review from camc314 as a code owner December 22, 2025 20:08
@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Dec 22, 2025
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 fixes a bug where ignorePatterns from extended configurations were not being merged properly. Previously, only the current config's patterns were used, completely ignoring patterns from extended configs.

Key changes:

  • Updated the merge method to combine ignore_patterns from both the extended config and the current config
  • Added comprehensive test coverage to verify the merge behavior in various scenarios

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

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Michael Ireland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant