[GRASS-dev] How to reformat markdown to pass pre-commit?

Markus Neteler neteler at osgeo.org
Thu Sep 14 05:52:32 PDT 2023


On Thu, Sep 14, 2023 at 5:42 AM Vaclav Petras <wenzeslaus at gmail.com> wrote:
> On Wed, 13 Sept 2023 at 15:13, Markus Neteler <neteler at osgeo.org> wrote:
>>
>> Hi,
>>
>> I have updated doc/infrastructure.md in my local Git copy and fail to
>> commit it in a new PR due to pre-commit linting checks:
>>
>> markdownlint.............................................................Failed
>> ...
>>
>> I tried to use `mdformat` on the file but the result isn't compatible
>> with markdownlint.
>>
>> Is there any other tool to auto-format the file (even a 90% solution is fine)?
>
>
> I used these two in the past with GRASS GIS:
>
> npx markdownlint-cli --fix  doc/infrastructure.md
> npx prettier --print-width 80 -w  doc/infrastructure.md
>
> I don't remember exactly, but I guess at least one worked okay.

Nice, the second one does the job tp 95%.

Thanks
Markus


More information about the grass-dev mailing list