Skip to content

Conversation

@soren121
Copy link

@soren121 soren121 commented Sep 26, 2025

Fixes #3212

The plugin's default export is not equal by reference to the plugin object defined on flat configs. This can cause issues for ESLint's plugin normalization in some scenarios. This PR changes the default export to equal the plugin object.

I've added tests for this change, and I also added missing tests for the flat config exports.

@soren121 soren121 force-pushed the add-default-export branch 2 times, most recently from cbc3a9c to 6cc837a Compare September 26, 2025 20:56
@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.77%. Comparing base (01c9eb0) to head (12d770c).

Additional details and impacted files
@@ Coverage Diff @@ ## main #3213 +/- ## =========================================== + Coverage 82.25% 95.77% +13.51%  =========================================== Files 94 83 -11 Lines 4283 3691 -592 Branches 1478 1332 -146 =========================================== + Hits 3523 3535 +12  + Misses 760 156 -604 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@soren121 soren121 changed the title Add default export to match declared types Fix plugin normalization issues by changing default export of plugin to equal the plugin object of flat configs Sep 26, 2025
@soren121 soren121 changed the title Fix plugin normalization issues by changing default export of plugin to equal the plugin object of flat configs Match default export of plugin and plugin object of flat configs Sep 26, 2025
@jankanty
Copy link

Is there a way to progress with this PR? It blocks usage of default configs with flat structure.

@Nivl
Copy link

Nivl commented Nov 19, 2025

cc @ljharb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants