-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: support prettier-plugin-jsdoc #27
Conversation
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 @aminya and sorry for my delay. Would you be able to add a test for this in the ./tests/specs folder? That way we can ensure this works and keeps working. Thanks!
f995ecc
to
7e2fe5a
Compare
I get an error that |
I replaced EsBuild with Parceljs. Now, Parceljs correctly bundles the project making it possible to use it in the browser. I also added a test for JSDoc formatting. All the tests pass. |
This fixes the issues with the bundle
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 a lot for figuring this out, @aminya! Also, sorry for my delay.
I made a few changes to this PR in order to make the plugin opt-in since it doesn't seem that popular.
Thanks for merging. I don't mind the opt-in option, but I think JSDoc is way more popular than Astro and Svelte. So the options are inconsistent. |
I was thinking both astro and svelte would be opt-in by asking the dprint-plugin-prettier plugin to format svelte/astro files or not? In the case of jsdoc it's intertwined in the js output. |
Well, prettier-plugin-jsdoc also only works if the user uses TSDoc or JSDoc for documentation. The nature of the existence of a file format doesn't justify the feature. Or we could go the other way and enable all of them. As long as people can disable them, it should be fine. |
I’d rather this format TypeScript and JavaScript files out of the box the same way as prettier does, then people can opt in to the jsdoc plugin to change how ts/js files are formatted if they would like similar to how they have to opt in with prettier. Actually, maybe the option configuration should have the same structure as prettier does and be an array. |
Fixes #21