Skip to content

Ensure loadConfig returns the correct configuration when there are multiple configs #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

davazp
Copy link

@davazp davazp commented Mar 7, 2025

Fixes #390

Pull Request Name

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes #390

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • OS + version: e.g. macOS Mojave
  • NPM version: ...
  • Node version: ...

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@hyoban
Copy link

hyoban commented Mar 9, 2025

I also found this problem and gave my fix in #389

@davazp davazp changed the title Ensure loadConfig returns the configuration if it is a new configuration Ensure loadConfig returns the correct configuration when there are multiple configs Mar 9, 2025
@davazp
Copy link
Author

davazp commented Mar 9, 2025

Nice @hyoban, good timing.

I see, so your solution keeps a cache for each config.

Because the order file aren't processed isn't guaranteed with eslint, it's nice when files are processed alternatively from different projects. I left a comment in your PR to make it even more in that direction.

I'll keep mine around just in case, but I'm good if we focus on getting your fix merge.

@davazp davazp closed this Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Mixed configuration when working in a project with multiple configurations
2 participants