Skip to content

Match default export of plugin and plugin object of flat configs#3213

Open
soren121 wants to merge 1 commit into
import-js:mainfrom
soren121:add-default-export
Open

Match default export of plugin and plugin object of flat configs#3213
soren121 wants to merge 1 commit into
import-js:mainfrom
soren121:add-default-export

Conversation

@soren121

@soren121 soren121 commented Sep 26, 2025

Copy link
Copy Markdown

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

codecov Bot commented Sep 26, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.77%. Comparing base (01c9eb0) to head (12d770c).
⚠️ Report is 41 commits behind head on main.

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 Harness.
📢 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
Copy Markdown

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

@Nivl

Nivl commented Nov 19, 2025

Copy link
Copy Markdown

cc @ljharb

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Plugin export is not equal to plugin object on flat configs

3 participants