-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
prefer-export-from
shouldn't report re-export of variable that is used in other statements
#1577
Comments
Check this comment and related comments #1453 (comment) |
@fisker those comments seems a bit reasonable with a The example should use local files: import {MyTinyForm} from '../components/forms/tiny.js';
export {MyTinyForm} from '../components/forms/tiny.js';
console.log('Registered', MyTinyForm.getName()); … and that's awful compared to import {MyTinyForm} from '../components/forms/tiny.js';
export {MyTinyForm};
console.log('Registered', MyTinyForm.getName()); Even OP’s example shows that the rule does not suggest cleaner code. |
A |
Sure. |
The
prefer-export-from
rule warns about the first export and wants to change it to:I think that this duplication is more confusing:
a
imported asa
, but also re-exported with a different name.I therefore suggest to ignore exports of variables that are used in other statements.
Real-life reproduction: OpenLightingProject/open-fixture-library@
dependabot/npm_and_yarn/eslint-plugin-unicorn-38.0.1
/lib/schema-properties.jsThe text was updated successfully, but these errors were encountered: