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 jsdoc eslint plugin #72308
Update jsdoc eslint plugin #72308
Conversation
This PR modifies the release build for happy-blocks To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-r7r-p2 |
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
This PR modifies the release build for odyssey-stats To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PejTkB-3N-p2 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~1 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~1 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
3db3471
to
99b49a0
Compare
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.
Thanks for working on this 🙌
Left a few suggestions and questions, let me know what you think.
FWIW I think it looks great already!
BTW, the reason there are so many oddities in the jsdoc eslint plugin is because they actually fixed a bug with the Bug reports: |
503c5a7
to
7d167ec
Compare
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 looks great 👍 Thanks @noahtallen! 🚀
I've committed a couple of last-minute fixes if you don't mind.
Oh, I just saw #72348. Feel free to delete that commit! |
Wow, they already released a fix for one of my bug reports! I updated to include that version, which let us remove the weird |
f42259f
to
3f3340c
Compare
* Update eslint-plugin-jsdoc peer dep * fix jsdoc/require-returns-check rule * Fix type in media modal component * Fix jsdoc/check-param-names * Fix more instances of jsdoc return issue by returning null from react components Co-authored-by: Marin Atanasov <tyxla@abv.bg>
Proposed Changes
Separating this from #72245 to simplify things. Updates eslint-plugin-jsdoc across the repo to properly support Node 18. cc @anomiex
The initial update introduced two problems:
Object
withobject
.The first fix is easy -- just add a setting which allows both Object and object. I don't see a big reason to enforce one over the other at this point, especially since we'd rather use Typescript.
The second one just meant going through several files and fixing the return type. Almost every error was caused by functions like this:
This is obviously problematic, because the real return type is
string|undefined
. So I just made that adjustment in several files.There are a few more issues reported by the main linter build below, but not enough to fail the build. I did find weird behavior in the eslint jsdoc lib, which I reported here: gajus/eslint-plugin-jsdoc#949
Testing Instructions
CI, and verify that changes make sense. The full eslint build is running here: https://teamcity.a8c.com/buildConfiguration/calypso_CheckCodeStyle/9329626