-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add lines alignment rule #636
Conversation
Iteration already handles that.
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.
Besides my comments, this looks good to me from an initial look.
It would be ideal if we could in the future instead use comment-parser
for obtaining the tag, name, and description with whitespace, but comment-parser
doesn't currently support that, so regexes should work for now.
If you could make the changes per the comments, I can see about taking a closer look locally. Thanks a lot!
@brettz9, thank you for your first review! I still need to change a little my last commit to having the full coverage, but I already pushed, so you can see the other changes for now! 😉 |
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.
One important and one minor change, though both small and easy-to-change.
All the other recent changes look great.
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.
And this one too if you wouldn't mind--forgot there was this...
"Always" will check for the alignemnt. "Never" is not yet implemented, but will check if there is no more than one space between the parts.
Co-authored-by: Brett Zamir <[email protected]>
Report an error through eslint instead of throw.
It's not a standard used by any project, so the default is off
0d759f2
to
1c1dd68
Compare
🎉 This PR is included in version 30.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Yes, you are correct, it should have been And my apologies, I've just now quickly renamed the rule to |
The PR
When developing for WordPress, there is a recommended standard to have the comment lines aligned.
Some days ago, we created an Eslint rule for that: https://github.com/Automattic/eslint-plugin-jsdoc-alignment/
It was created with the purpose to start using it and soon submit a contribution to add it to the
eslint-plugin-jsdoc
, which makes much more sense.If this PR is approved, the current
eslint-plugin-jsdoc-alignment
will be deprecated in favor of this rule.It's my first contribution to
eslint-plugin-jsdoc
, so I'm sorry if I missed something. But I'll be happy to fix anything if needed.Example
❌ Incorrect example:
✅ Correct example: