Enable eslint-jsdoc
Description
This PR enables eslint-plugin-jsdoc. I figured we'd go ahead and enable the defaults, and we'll turn off rules for now that will require a lot of manual fixes. We can systematically enable rules and fix them one-by-one where time allows or need arises. For example, type checking may be particularly helpful.
- Uses the recommended ruleset. In the future, we may want to turn on TS mode, but for now we'll default to the recommend for JS-only.
- Disable rules that are against our coding consistencies, at least for the time being and added comments why
- Disabled quite a few rules which require manual fixes, like filling in types and descriptions, until we can manually fix.
- Autofix with
npm run eslint -- --fix
Issue number and link
Fixes https://github.com/CesiumGS/cesium/issues/10815
Testing plan
- Run
eslintand ensure there are no failures - Run
build-docsand ensure the built documentation is not broken - Run
build-tsand ensure there are no errors (there will still be warnings)
Author checklist
- [x] I have submitted a Contributor License Agreement
- [x] I have added my name to
CONTRIBUTORS.md - [ ] ~I have updated
CHANGES.mdwith a short summary of my change~ - [ ] ~I have added or updated unit tests to ensure consistent code coverage~
- [x] I have update the inline documentation, and included code examples where relevant
- [x] I have performed a self-review of my code
Thank you for the pull request, @ggetz!
:white_check_mark: We can confirm we have a CLA on file for you.
If I could summarize the changes I'm seeing
- rename properties that are synonyms to the "true" one, this is good imo :+1:
- constructor to class
- return to returns
- exception to throws
- remove empty lines as outlined in my comment above :neutral_face:
- I agree with some of these that were excessive (double lines, ones between some tags)
- I disagree with many of them that created valuable visual separation between chunks of tags and between the description and all tags. again, mentioned above
- adding
@paramsfor those that didn't exist before, again see above :shrug:
I've reviewed about 100 of the 800+ files and these seem to be the only changes. I'm going to stop here for now in case we change how the rules above are handled so I don't waste time reviewing files that may not actually have any changes.
Overall I'm definitely a fan of including this to automate more of this consistency and look forward to reviewing and turning on more rules in the future
This needs a merge. I'm closing until I get the chance.