-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pre-commit: add eslint-plugin-jsdoc #4580
Conversation
This allows us to enforce that the libraries we ship come with good JSDoc comments which should improve DX when mapping with capable code editors.
Won't this prevent any changes to the first midi-components library, the common controller scripts or the hid package parser? Or do you plan to add jsdoc comments to all of these? |
From my tests so far, it only actually enforces jsdoc comment style. If there is no jsdoc comment, the test just passes. I think this is because it can't detect what symbols we're actually exporting currently. Once we convert some of the modules to proper ES modules, the jsdoc hook should work. In the meantime, it just scans source files for jsdoc comments and complains about those but does not force that everything needs to have a comment. |
My PR #4583 fails with: |
mhmm pretty sure it isn't. I guess your pre-commit environment got initialized incorrectly. Maybe try |
@JoergAtGithub I reinstalled pre-commit completely and ran it on an example file. eslint works as expected. I'm pretty sure the pre-commit failures are unrelated to this PR.
|
This allows us to enforce that the libraries we ship
come with good JSDoc comments which should improve DX
when mapping with capable code editors.