Cross-project-council: Add markdown linter

Created on 25 Jun 2019  Â·  6Comments  Â·  Source: openjs-foundation/cross-project-council

as suggested by @boneskull

good first issue

Most helpful comment

I much prefer the linter as a test suite that can be run via ci and
manually run to format.

I'm not a huge fan of auto formatting, even less so in a CD fashion. I
might be old fashioned but auto patching like that gives me the willies

On Thu, Jun 27, 2019, 1:00 AM Christopher Hiller notifications@github.com
wrote:

Here's an example patch
https://gist.github.com/boneskull/3ae9a7f90301234bac268de3c8478bc7 of
what it did with README.md.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openjs-foundation/cross-project-council/issues/233?email_source=notifications&email_token=AADZYV2J7BV6MBLGKTEPRSLP4RCONA5CNFSM4H3DCSI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYV5TCQ#issuecomment-506190218,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADZYV2472MXJ7DC64OSZF3P4RCONANCNFSM4H3DCSIQ
.

All 6 comments

I have a proof-of-concept working in a private fork of this repo which automatically reformats any Markdown file in a push (or pull request) with Prettier. If someone is really fussy about what the Markdown looks like, we can adopt a different tool, but personally I've found it to be reasonable and helpful--including auto-formatting Markdown tables, which is awesome.

When reformatting occurs, a new changeset is automatically appended to the branch, authored by github-actions[bot], with the commit message "prettier: lint fix".

The action is based on bltavares/actions. The differences:

  1. It only operates on files with the .md extension
  2. The action will not fail if prettier cannot find files to lint
  3. It uses the latest tagged version of Prettier

AFAIK public repos still cannot use GitHub actions.

IMO using an action would be ideal, so contributors won't have to install or run any toolchain locally. We could potentially configure a CI service to do this, but that seems kind of painful.

fwiw the only part of prettier's markdown formatting i find remotely appealing is the table formatting.

Here's an example patch of what it did with README.md.

I much prefer the linter as a test suite that can be run via ci and
manually run to format.

I'm not a huge fan of auto formatting, even less so in a CD fashion. I
might be old fashioned but auto patching like that gives me the willies

On Thu, Jun 27, 2019, 1:00 AM Christopher Hiller notifications@github.com
wrote:

Here's an example patch
https://gist.github.com/boneskull/3ae9a7f90301234bac268de3c8478bc7 of
what it did with README.md.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openjs-foundation/cross-project-council/issues/233?email_source=notifications&email_token=AADZYV2J7BV6MBLGKTEPRSLP4RCONA5CNFSM4H3DCSI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYV5TCQ#issuecomment-506190218,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADZYV2472MXJ7DC64OSZF3P4RCONANCNFSM4H3DCSIQ
.

I've added this as a good first issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joesepi picture joesepi  Â·  5Comments

joesepi picture joesepi  Â·  8Comments

mhdawson picture mhdawson  Â·  3Comments

bnb picture bnb  Â·  8Comments

eemeli picture eemeli  Â·  5Comments