-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Teach sort-comp rule about static class methods #429
Teach sort-comp rule about static class methods #429
Conversation
A number of people have said that they think it makes sense for static class methods to appear at the very top of classes. This commit allows this to be configured by adding the `static-methods` keyword to the sort-comp rule. Fixes jsx-eslint#128
This word was misspelled.
I noticed a couple of cases where we continue looping even though we don't need to anymore. In these special keyword cases, we can break out of these loops as soon as we find a match to get a little bit of a speed boost.
Awesome! 👍 |
Can this include static properties too ? |
Those don't exist yet. However, it should once they do :-) |
Thank you very much for this. But since it can be a breaking change in some configuration I will wait for the next major release to merge it. |
Sounds good. Is there anything I can do to help get the next major release out sooner? |
Sure. I will publish a checklist (maybe tomorrow) of what I would like to pass in next major release. |
Add static method support to sort-comp (fixes #128)
Merged, thanks! |
A number of people have said that they think it makes sense for static
class methods to appear at the very top of classes. This PR allows
this to be configured by adding the
static-methods
keyword to thesort-comp rule.
While I was at it, I fixed a couple of typos and made a minor perf tweak.
Fixes #128