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

Fix: object-curly-spacing for type annotations (fixes #6940) #6945

Merged
merged 1 commit into from Aug 24, 2016

Conversation

mysticatea
Copy link
Member

@mysticatea mysticatea commented Aug 20, 2016

Fixes #6940.

This PR changes the way to find '}' token.

I followed #6723 about the way of tests.

@eslintbot
Copy link

LGTM

@mention-bot
Copy link

@mysticatea, thanks for your PR! By analyzing the annotation information on this pull request, we identified @nzakas, @vitorbal and @pmcelhaney to be potential reviewers

* @returns {Token} '}' token.
*/
function getClosingBraceOfObject(node) {
const lastProperty = node.properties[node.properties.length - 1];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to account for the possibility of node.properties.length === 0 here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. It has been checked at the top of checkForObject function. So I just wrote it in the jsdoc comment.

@nzakas
Copy link
Member

nzakas commented Aug 21, 2016

Lgtm, just waiting another day so others can review.

@platinumazure
Copy link
Member

LGTM.

@nzakas nzakas merged commit 7660b39 into master Aug 24, 2016
@mysticatea mysticatea deleted the issue6940 branch August 24, 2016 20:41
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants