uswds / web-components

Work on the next version of USWDS will happen here
https://federalist-c7964e49-2db7-4585-85f1-49d23b9329cb.sites.pages.cloud.gov/site/uswds/uswds-next/
23 stars 4 forks source link

USWDS-Next - CI: Create a GH action to test code formatting #32

Closed mejiaj closed 1 month ago

mejiaj commented 2 months ago

Closes #33.

A new CI test that runs prettier on push.

Before After
image image

Major changes

How to test

  1. Run npm run prettier:js && npm run prettier:md.
  2. There should be zero errors.
  3. Modify a JS file to add an error like ${ this.href }.
  4. You should see a code style issue.
  5. Modify an MDX file to add an error like { Readme }.
  6. You should see a code style issue.
  7. Run npm run prettier:js:fix && npm run prettier:md:fix to fix issues.
  8. Styles should match after re-running npm run prettier:js:fix && npm run prettier:md:fix.
mejiaj commented 2 months ago

@heymatthenry thanks for the suggestions.

Changes were minor, so I've added them and updated the PR description to include the new info.