HubSpot / prettier-maven-plugin

Apache License 2.0
116 stars 23 forks source link

Markdown support #29

Closed 0x2b3bfa0 closed 2 years ago

0x2b3bfa0 commented 3 years ago

Though it might be out of scope for this project, it would be great to support Markdown formatting along with Java.

spitfjre commented 3 years ago

Prettier can format markdown already. So for the meantime just use node.

0x2b3bfa0 commented 3 years ago

Prettier can format markdown already. So for the meantime just use node.

I know, but this plugin is, by far, more convenient. I was wondering if we could simply add some configuration parameters to specify which formats we want to prettify.

https://github.com/HubSpot/prettier-maven-plugin/blob/faac30848d2e69e2b642a2b15ac26dbc391deac7/src/main/java/com/hubspot/maven/plugins/prettier/AbstractPrettierMojo.java#L172

GoldSubmarine commented 3 years ago

I submitted a PR to support Markdown #37

jhaber commented 2 years ago

You should now be able to do this via the inputGlobs configuration parameter. For example:

<inputGlobs>
    <inputGlob>src/main/java/**/*.java</inputGlob>
    <inputGlob>src/test/java/**/*.java</inputGlob>
    <inputGlob>src/main/resources/**/*.md</inputGlob>
</inputGlobs>