Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): set prettier action to run on PR to main, fix format #2764

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

ThatOneBro
Copy link
Member

@ThatOneBro ThatOneBro commented Sep 1, 2023

Background

Follow-up to #2758.

We have tested that the prettier workflow works and prevents merging code with incorrect formatting.

Trying to commit unformatted code:

Screen Shot 2023-09-01 at 1 48 51 PM

Fixing the mentioned errors after running npm run prettier:

Screen Shot 2023-09-01 at 1 53 26 PM

What this PR does

  • Makes the prettier workflow run on any PR to the main branch
  • Fixes some formatting errors in some Markdown files that somehow got missed in the last run. We only run prettier in CI against TS/JS-like files, but we should also lint any TypeScript in Markdown files as well to fit with our house style guide, and our npm run prettier script already runs against . so we might as well fix these so people don't get a bunch of files to commit if they follow the instructions given in the comment when prettier fails.

Why not autofix?

It's an anti-pattern- we should encourage devs to be running prettier themselves so they get in the habit of writing more conformant code and also modifying commits in CI is bad.

@ThatOneBro ThatOneBro requested a review from a team as a code owner September 1, 2023 19:08
@vercel
Copy link

vercel bot commented Sep 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
medplum-www ✅ Ready (Inspect) Visit Preview Sep 1, 2023 7:08pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
medplum-storybook ⬜️ Ignored (Inspect) Sep 1, 2023 7:08pm

@sonarcloud
Copy link

sonarcloud bot commented Sep 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ThatOneBro ThatOneBro added this pull request to the merge queue Sep 1, 2023
Merged via the queue into main with commit a7651f5 Sep 1, 2023
12 checks passed
@ThatOneBro ThatOneBro deleted the derrick-run-prettier-pr-to-main branch September 1, 2023 21:31
codyebberson added a commit that referenced this pull request Sep 4, 2023
Agent installer performs silent upgrades (#2765)
Use Turborepo cache in Github Actions (#2766)
config(prettier): only run `prettier` on JS/TS-like files from CLI (#2767)
Fixes #2568 - move react native example into monorepo (#2742)
chore(ci): set `prettier` action to run on PR to `main`, fix format (#2764)
Fix typo: "Enpoint" -> "Endpoint" (#2763)
ci(prettier): add `prettier` check to Actions (#2758)
Document search implementation (#2750)
Bot logging fixes (#2743)
Update handling of AccessPolicy write criteria and add docs (#2720)
Allow search on name and address using stop word (#2749)
fix(ValueSet-expand): delete null `display` fields before resp (#2746)
Agent localhost testing documentation and examples (#2741)
Add repeatable items and groups to Questionnaire (#2690)
github-merge-queue bot pushed a commit that referenced this pull request Sep 5, 2023
Agent installer performs silent upgrades (#2765)
Use Turborepo cache in Github Actions (#2766)
config(prettier): only run `prettier` on JS/TS-like files from CLI (#2767)
Fixes #2568 - move react native example into monorepo (#2742)
chore(ci): set `prettier` action to run on PR to `main`, fix format (#2764)
Fix typo: "Enpoint" -> "Endpoint" (#2763)
ci(prettier): add `prettier` check to Actions (#2758)
Document search implementation (#2750)
Bot logging fixes (#2743)
Update handling of AccessPolicy write criteria and add docs (#2720)
Allow search on name and address using stop word (#2749)
fix(ValueSet-expand): delete null `display` fields before resp (#2746)
Agent localhost testing documentation and examples (#2741)
Add repeatable items and groups to Questionnaire (#2690)
@reshmakh reshmakh added this to the September 15, 2023 milestone Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants