-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update Eslint JSDoc package, introducing JSDoc line alignment check #25300
Conversation
I didn't fix the new reported Gutenbeg Eslint issues in this PR. How should we proceed in cases like that when we update Eslint dependencies? Maybe the cleaner way could be creating another PR with the fixes and merge it before this PR. If it makes sense, I can create this PR. |
This I think makes sense? Is there many instances to fix? |
Yep! There were a lot of issues to fix. But the most part was automatically updated. I also updated the new rule to I think it makes more sense as it's related to documentation format only. |
It'd also allow us to merge before the other PR with the fixes. |
I'd like to highlight this issue that @noahtallen found: #25352 (review) Just to check if someone thinks we should hold this change until we fix that in the plugin. In my opinion, I think it wouldn't be a big deal because it's easy to fix stuff. |
Looking good @renatho, I've left some comments o the follow up PR |
I mentioned this on the PR, but I think this should be explored also: It may in fact we worthwhile trying to use Prettier prettier-plugin-jsdoc here to update the docs s mentioned here in #24984 (comment) as this may be signifantly quicker for both this PR and future code written will be formatted automatically rather than a devloper pushing up code that then fails linting |
Hey @ntwb! I totally agree! It's much easier while developing. I checked that plugin, but running against the Sensei LMS code, it threw some errors for me. I'm planning to take a look at this too and contribute with some PR with fixes if it makes sense. |
I added a new PR with fixes to the Eslint plugin here gajus/eslint-plugin-jsdoc#638 The maintainer suggested a different approach which I think makes sense. It'll just take a little more time, so I think I'll keep this PR (and the #25352) in stand by until going with this fix. And in these changes, I can explore more the issues we found while formatting in the #25352. |
@renatho, nice work on this PR. Looking forward to seeing future revisions :) |
I believe it's still blocked by the pending patch in the ESLint plugin, right? Is this rule fixable, in effect does it work with |
Actually, now it's waiting for this change: syavorsky/comment-parser#93.
Yes! The current implementation is prepared to autofix, and after the changes it'll continue with this feature, but more complete than the current implementation. The current implementation only checks and autofix the tags |
@renatho, super cool stuff. Thank you for your very detailed response 💯 |
@gziolo @renatho |
@skorasaurus, great news! I guess, we still need to wait until ESLint plugin gets updated as it's using 0.x version: |
@skorasaurus @gziolo Yep! Now the Very excited about that! As soon as I can I want to make refactor the rule. |
Good news! |
It's temporarily disabled to allow the eslint plugin update without errors.
The purpose of this change was readability improvement only.
2bf1f08
to
7406b15
Compare
I rebased the branch and fixed the issues again. Is there something I could do in order to go ahead with this PR to avoid more conflicts? 🙂 |
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.
This is looking great to me! 👍
As long as it doesn't break anything, I think we should merge this, and create follow-up PRs for other improvements if there's any.
I don't see new warnings introduced with this PR so we are good: As a follow-up, we should promote the reporting level from a warning to error for the new rule, but this is something for the future when people get a chance to update their codebases. One thing that we will have to look at is whether |
Congratulations on your first merged pull request, @renatho! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
@renatho, congrats on your first merged pull request. It took some time but it required a ton of work so major props for all the time spent to make it happen 👏🏻 🎉 |
Hey folks! Thank you all for your reviews! And thank you for your patience in this very long PR! 😉 |
👋 friends! Over at the gutenberg-mobile repo, we seem to run into check failures related to the JSDoc updates from this PR, and I wonder if anyone can give a quick hand or share insight. I'm sure we need to update how we invoke the lint tests at this point but any insight on what's the new proper way to do it will be appreciated! Thanks! |
Hey there! Checking the Gutenberg Mobile repo, I noticed 2 things.
Could it be related to these questions? And since the |
Fixes #24984
Description
This PR updates the
eslint-plugin-jsdoc
, which now contains a rule to validate JSDoc alignment, as recommended in WordPress standards.How has this been tested?
Eslint checking in the Gutenberg code.
Screenshots
Types of changes
It's about Eslint rule updates. As it updates the rules, some new Eslint warnings/errors can appear considering the new rule added and updates in the plugin.
Checklist: