Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prettier Fix
name: Fix formatting

env:
PNPM_VERSION: "9.6.0"
Expand All @@ -13,9 +13,9 @@ on:
types: [labeled]

jobs:
prettify:
format:
runs-on: ubuntu-latest
if: github.event.label.name == 'prettify'
if: github.event.label.name == 'format'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -33,8 +33,8 @@ jobs:
with:
version: ${{ env.PNPM_VERSION }}

- name: Install prettier
run: pnpm add -g prettier@3.6.2
- name: Install formatter
run: pnpm install -D -w prettier

- name: Get changed files
id: get-changed-files
Expand All @@ -52,7 +52,7 @@ jobs:
return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' ');


- name: Run Prettier fix
- name: Fix formatting
run: |
CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }})
if [ -n "$CHANGED_FILES" ]; then
Expand All @@ -62,9 +62,9 @@ jobs:
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "prettier fix"
commit_message: "fix formatting"

- name: Remove label
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: prettify
labels: format
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prettier Check
name: Formatting check

env:
PNPM_VERSION: "9.6.0"
Expand All @@ -13,7 +13,7 @@ permissions:
contents: read

concurrency:
group: group-pretty-check-${{ github.ref }}-${{ github.workflow }}
group: group-format-check-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
Expand All @@ -35,7 +35,7 @@ jobs:
with:
version: ${{ env.PNPM_VERSION }}

- name: Install Prettier deps only
- name: Install formatter
run: pnpm install -D -w prettier


Expand All @@ -54,7 +54,7 @@ jobs:
);
return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' ');

- name: Check pretty (changed files)
- name: Check formatting (changed files)
run: |
CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }})
if [ -n "$CHANGED_FILES" ]; then
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING_ADVANCED.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ If you are on a UNIX system and you get a spawn error, run npm with `sudo`.

## Standards and Guidelines

Code style is enforced by [Prettier](https://prettier.io/docs/en/install.html), which automatically runs every time you make a commit.
Code formatting is enforced by [Prettier](https://prettier.io/docs/en/install.html), which automatically runs every time you make a commit.

For guidelines on commit messages, adding themes, languages, or quotes, please refer to [CONTRIBUTING.md](./CONTRIBUTING.md). Following these guidelines will increase the chances of getting your change accepted.

Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
"hotfix-fe": "monkeytype-release --hotfix --fe",
"hotfix-be": "monkeytype-release --hotfix --be",
"hotfix-dry": "monkeytype-release --hotfix --dry",
"pretty-check": "prettier --check .",
"pretty-check-be": "prettier --check ./backend",
"pretty-check-fe": "prettier --check ./frontend/src",
"pretty-check-assets": "prettier --check ./frontend/static",
"pretty-check-pkg": "prettier --check ./packages",
"pretty-fix": "prettier --write .",
"pretty-fix-be": "prettier --write ./backend",
"pretty-fix-fe": "prettier --write ./frontend/src",
"pretty-fix-assets": "prettier --write ./frontend/static",
"pretty-fix-pkg": "prettier --write ./packages",
"format-check": "prettier --check .",
"format-check-be": "prettier --check ./backend",
"format-check-fe": "prettier --check ./frontend/src",
"format-check-assets": "prettier --check ./frontend/static",
"format-check-pkg": "prettier --check ./packages",
"format-fix": "prettier --write .",
"format-fix-be": "prettier --write ./backend",
"format-fix-fe": "prettier --write ./frontend/src",
"format-fix-assets": "prettier --write ./frontend/static",
"format-fix-pkg": "prettier --write ./packages",
"lint-json-assets": "cd frontend && eslint \"./static/**/*.json\"",
"check-assets": "turbo check-assets --filter @monkeytype/frontend",
"check-assets-quotes": "turbo check-assets --filter @monkeytype/frontend -- quotes",
Expand Down
Loading