eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

Match default export of plugin and `plugin` object of flat configs

Open soren121 opened this issue 5 months ago • 3 comments

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 avatar Sep 26 '25 20:09 soren121

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: 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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Sep 26 '25 21:09 codecov[bot]

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

jankanty avatar Oct 30 '25 15:10 jankanty

cc @ljharb

Nivl avatar Nov 19 '25 06:11 Nivl