Skip to content

Fix fixer for require-hyphen-before-param-description #266

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

Merged
merged 2 commits into from
May 30, 2019

Conversation

jasminexie
Copy link
Contributor

Thank you for the quick response to #265, but it appears I haven't tested thoroughly. Sincerest apologies!

This PR fixes hyphen insertion for the following cases:

  • Parameter name and description are equal
/*
 *@param foo foo
 */
function () {}

by replacing the last occurrence in a line, not the first.

  • Multiline descriptions
/*
 * @param foo single line
 * another line
 */
 function () {}

by replacing the (last occurrence of (the first line of the description)) in a line.

That's a mouthful :/
Hopefully this will have covered all cases. Please let me know if I've missed anything.

@brettz9 brettz9 merged commit be9c24e into gajus:master May 30, 2019
@gajus
Copy link
Owner

gajus commented May 30, 2019

🎉 This PR is included in version 7.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 30, 2019
@brettz9
Copy link
Collaborator

brettz9 commented May 30, 2019

Thanks for the fixes!

Btw, if you're ever in Shenzhen, we've had a kind of informal meeting for open source... brettz9 is my WeChat ID...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants