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

Feature request: Require file to have atleast one named export with the same name as file. #38

Open
emattias opened this issue Apr 17, 2019 · 1 comment

Comments

@emattias
Copy link

We dont use default exports so we cant use match-exported rule.

I would like a rule to complain if yoh have:

filename: Button.tsx and it contained only:

const BigButton = () => <button>foo</button>;
export { BigButton }

but allow it if the file contained this:

const Button = () => <button>foo</button>;
export { Button }

PS. This explains alot of the reasons why we avoid default exports: https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html

@philostler
Copy link

Looking for this also

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

No branches or pull requests

2 participants