Skip to content

feat(linter): allow namespace re-export in import/no-cycle#11995

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-01-feat_linter_allow_namespace_re-export_in_import_no-cycle_
Jul 1, 2025
Merged

feat(linter): allow namespace re-export in import/no-cycle#11995
graphite-app[bot] merged 1 commit intomainfrom
07-01-feat_linter_allow_namespace_re-export_in_import_no-cycle_

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Jul 1, 2025

Re-exporting as a namespace has no workarounds so should be allowed:

In test.js:

export function Foo() {}
export * as Example from './test.js';

But, re-exporting it-self should be disallowed:

export function Foo() {}
export * from './test.js';

fixes #11646
closes #11671

@Boshen Boshen requested a review from camc314 as a code owner July 1, 2025 09:21
@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Jul 1, 2025
Copy link
Member Author

Boshen commented Jul 1, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 1, 2025

CodSpeed Instrumentation Performance Report

Merging #11995 will not alter performance

Comparing 07-01-feat_linter_allow_namespace_re-export_in_import_no-cycle_ (899b8b4) with main (f7a2ae4)

Summary

✅ 38 untouched benchmarks

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jul 1, 2025
Copy link
Contributor

camc314 commented Jul 1, 2025

Merge activity

Re-exporting as a namespace has no workarounds so should be allowed:

In test.js:
```js
export function Foo() {}
export * as Example from './test.js';
```

But, re-exporting it-self should be disallowed:

```js
export function Foo() {}
export * from './test.js';
```

fixes #11646
closes #11671
@graphite-app graphite-app bot force-pushed the 07-01-feat_linter_allow_namespace_re-export_in_import_no-cycle_ branch from 8e1f026 to 899b8b4 Compare July 1, 2025 09:52
@graphite-app graphite-app bot merged commit 899b8b4 into main Jul 1, 2025
23 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 1, 2025
@graphite-app graphite-app bot deleted the 07-01-feat_linter_allow_namespace_re-export_in_import_no-cycle_ branch July 1, 2025 09:55
@oxc-bot oxc-bot mentioned this pull request Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: import/no-cycle false positive

2 participants