-
-
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
newline-after-import with decorators #595
newline-after-import with decorators #595
Conversation
@lukekarrys Awesome! Thanks a lot for this! Also thanks for the great report, which I did not have time to look at until now. I'm not familiar with the decorators syntax, but this looks good to me. As for supporting decorators... It's currently at stage 2, which is not the safest stage but means it will likely make it in the spec. I think the way this is implemented it should be fine even if it doesn't make it into the spec, or if it changes a bit. I'm fine with this at the moment. @benmosher? |
I rebased this against |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this. @benmosher If you disagree supporting stage-2 features, that's fine by me too.
Nope, I'm cool with decorators. Maybe not always all of stage 2, but definitely decorators. 😎 |
This fixes the crash outlined in #592, when using a
require
statement inside a decorator.While I was in there I also noticed that
newline-after-import
wasn't properly reporting if the next line was a decorator. I added this so it would be properly reported, but I can remove that if decorator support isn't something you want to add (I know it's still experimental).