Skip to content

fix(linter): only check aggregated exports in eslint/no-duplicate-imports#20178

Open
kennytm wants to merge 1 commit intooxc-project:mainfrom
kennytm:fix-20176
Open

fix(linter): only check aggregated exports in eslint/no-duplicate-imports#20178
kennytm wants to merge 1 commit intooxc-project:mainfrom
kennytm:fix-20176

Conversation

@kennytm
Copy link

@kennytm kennytm commented Mar 10, 2026

skip checking export { ... }; in eslint/no-duplicate-imports when includeExports is enabled, matching ESLint behavior.

close #20176.

@kennytm kennytm requested a review from camc314 as a code owner March 10, 2026 07:37
Copilot AI review requested due to automatic review settings March 10, 2026 07:37
@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Mar 10, 2026
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 updates the eslint/no-duplicate-imports rule to match ESLint’s behavior when includeExports is enabled by avoiding false positives for export lists without a from clause (e.g., export { M, MC };) that re-export previously imported bindings.

Changes:

  • Skip duplicate-export checks for export { ... }; / export type { ... }; statements that do not have a from clause.
  • Add regression tests ensuring re-exporting imported bindings via export lists does not trigger no-duplicate-imports when includeExports: true.

You can also share your feedback on Copilot code review. Take the survey.

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.

linter: false positive in eslint/no-duplicate-imports with includeExports when reexporting

2 participants