hosseinmd / prettier-plugin-jsdoc

A Prettier plugin to format JSDoc comments.
MIT License
228 stars 29 forks source link

The plugin does not work if it is not listed last in the list of plugins. #212

Closed ManucherKM closed 11 months ago

ManucherKM commented 11 months ago

Hello. I recently came across a problem. For some unknown reason, the plugin stops working if it is not listed last in the list of plugins. Config in which it does not work: image The config in which it works: image Prettier and plugins for it are in my package.json: image I apologize for showing the config with screenshots. When I submit my code, GitHub can't format it correctly.

hosseinmd commented 11 months ago

Hi dear, Related to https://github.com/hosseinmd/prettier-plugin-jsdoc/issues/99 We fixed https://github.com/hosseinmd/prettier-plugin-jsdoc/commit/bfc9c3901e6a0d702b740e9297dea6d5606f3623

shnhrrsn commented 9 months ago

I don't think this is fixed, I just installed prettier-plugin-jsdoc for the first time, so using latest version, and couldn't figure out why it wasn't doing anything until I found this issue.

Moving prettier-plugin-jsdoc to the end of my plugins "fixed" the issue.

hosseinmd commented 9 months ago

The best solution for this, is merging parsers. In another word, we have a wrapper which all related parsers will be run in that.

So to do that we should be the last one which replacing parser. Otherwise, they will kick us out of the game.

hosseinmd commented 9 months ago

Perhaps this should be fixed by prettier. Prettier doesn't have an official way to these types of plugins.