-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rule Proposal: exports-last #620
Comments
Sounds good to me. @k15a Would you be interested in working on this if it gets accepted? :) |
I am interested but I tried working on another issue 2 times and failed hard so it's not a guarantee for success 😆 |
Sounds like a reasonable style guide rule to me. 👍 |
Good afternoon! The question is: can I cancel the rule (put it in ignor) for classes that are exported at the beginning of the file export default class SomeClass, followed by defaultProps and PropTypes? |
no. Class fields exists, define them inside the class body. |
This would be reasonable for storybook csf files, since templating would require exports to be mixed within the file |
@RodrigoNovais you can use |
Didn't know that's possible, thank you @ljharb |
I would like to propose a new rule which enforces that all export statements are at the end of the file.
Why?
I really like to keep all my exports at the end of the file so I can quickly scan what a file exports.
The text was updated successfully, but these errors were encountered: