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
Fix: Amend keyword-spacing to validate default
keywords
#11097
Conversation
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.
LGTM, could you please also add a test, thanks!
Sure thing; will do |
@aladdin-add Added! |
Has anyone (e.g., @aladdin-add) on the team had a chance to reproduce this issue? If so, we should label as "accepted". (I tried to reproduce it just now, but the demo is unreliable on mobile.) |
I'll check it later. @platinumazure |
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.
LGTM, thanks!
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.
LGTM, thanks!
I think this might need to be an "Update" commit since this could increase warnings for users. I'll take care of that on merge.
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
I updated the keyword-spacing rule definition to properly validate
default
keywords. At present, it mistakenly validates theexport
token rather than the accompanyingdefault
. I changed the handler to sharecheckSpacingForModuleDeclaration
and amended that handler to include a special case for nodes with default export statements. This fixes: #11096