hosseinmd / prettier-plugin-jsdoc

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

fix: do not try to format tables found in code blocks #145

Closed beark closed 2 years ago

beark commented 2 years ago

Change also introduces new option, jsdocPreferCodeFences, which will format code blocks using fences (```) instead of indentation.

Fixes #144

beark commented 2 years ago

Not sure how you'd prefer the title and message to read, since there's both a "fix:" and a "feat:". I could split it up into two PRs if you want?

hosseinmd commented 2 years ago

Hi dear, Great work, LGTM I think we should always Prefer Code Fences. No need of an option to enable them. Or At least we could set default to true.

hosseinmd commented 2 years ago

My suggestion is removing jsdocPreferCodeFences

beark commented 2 years ago

As suggested, I removed the new option and instead default to always fence code blocks!

hosseinmd commented 2 years ago

I am not sour about this change, this is a breaking change. This need more discussion.

hosseinmd commented 2 years ago

@RunDevelopment @danielpza @mrvisser

beark commented 2 years ago

I'm happy to put the option to toggle whether fences or indentation are preferred back in, which would make it non-breaking.

danielpza commented 2 years ago

I'm happy to put the option to toggle whether fences or indentation are preferred back in, which would make it non-breaking.

:+1: for making it opt in if we don't want to worry about breaking changes. We should mention the option in the readme though.

danielpza commented 2 years ago

I like the code fence by default but it is a breaking change, we would need to bump the major version to not break the users workflow. This is something we can do later if we decide this is the default we really want. There's no rush to change the default right now, introducing this change under the flag sounds good to me

hosseinmd commented 2 years ago

All right. That was my mistake. @beark please add it to option again.

Thank you.