Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

group-exports aggregating modules should be valid #1471

Closed
atikenny opened this issue Sep 7, 2019 · 1 comment · Fixed by #1472
Closed

group-exports aggregating modules should be valid #1471

atikenny opened this issue Sep 7, 2019 · 1 comment · Fixed by #1472

Comments

@atikenny
Copy link

atikenny commented Sep 7, 2019

I would like to make aggregating modules valid when using the group-exports rule.

Use-case
When aggregating modules in a single file the group-exports rule fails on because of multiple export declarations. This makes it invalid to re-export submodules from the root of a module.

Steps to reproduce

  • create a file with the following exports
export { default as module1 } from 'module-1'
export { default as module2 } from 'module-2'
  • validate the file using the group-exports rule

Expected results
No linting error.

Actual result
Linting error.

@ljharb
Copy link
Member

ljharb commented Sep 8, 2019

The specifiers being different should avoid the warning; if you had two of these statements from the same module, it should require you to consolidate them.

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

Successfully merging a pull request may close this issue.

2 participants