uswds / uswds-site

USWDS website and documentation
https://designsystem.digital.gov
Other
194 stars 147 forks source link

USWDS-Site - Feature: Enable prettier on Markdown #2868

Open mejiaj opened 3 weeks ago

mejiaj commented 3 weeks ago

Is your feature request related to a problem? Please describe.

We're ignoring markdown files and that can cause inconsistencies and errors when writing MD/Frontmatter.

Example: https://github.com/uswds/uswds-site/pull/2864/commits/1c6453d5d19af098d10294b88a44b62517bddf40

Describe the solution you'd like

  1. Remove markdown from .prettierignore. https://github.com/uswds/uswds-site/blob/c719f796cb3aa5a3611212d90bbb64916abc8626/.prettierignore#L21
  2. Create two new NPM script to check & fix.
  3. Create CI checks for linting and formatting.
  4. Fix issues.

Describe alternatives you've considered

Only run prettier in a specific directory to avoid a ton of file changes.

Additional context

No response

Code of Conduct

amyleadem commented 1 week ago

Next steps:

Note: We should be careful to check pages like Maturity model and Design principles, since they are indicated in the git blame for the prettierignore.