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

fix formatter #121

Closed
wants to merge 4 commits into from
Closed
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
31 changes: 23 additions & 8 deletions .github/workflows/verify_formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,29 @@ jobs:
with:
node-version: 20

- name: Get Prettier version from package-lock.json
run: |
PRETTIER_VERSION=$(grep -m 1 'prettier' package-lock.json | cut -d '"' -f 4 | cut -c 2-)
echo $PRETTIER_VERSION

- name: Check formatting
run: |
npx --yes prettier@$PRETTIER_VERSION --check --config .prettierrc .
# - name: Get Prettier version from package-lock.json
# run: |
# PRETTIER_VERSION=$(grep -m 1 'prettier' package-lock.json | cut -d '"' -f 4 | cut -c 2-)
# echo $PRETTIER_VERSION

# - name: Install Prettier
# run: npm install prettier

# - name: Get Prettier version from package-lock.json
# run: |
# PRETTIER_VERSION=$(npm list prettier --json | jq -r '.dependencies.prettier.version')
# echo "Detected Prettier version: $PRETTIER_VERSION"
# echo "PRETTIER_VERSION=$PRETTIER_VERSION" >> $GITHUB_ENV

# - name: Check formatting
# run: |
# npx prettier --check --config .prettierrc .

- name: Prettify code
uses: creyD/[email protected]
with:
dry: True
prettier_options: --check --config .prettierrc .

- name: Fail if formatting check failed
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workings of the web application and help you set up your own local development.

## Overview

_TODO_
Wip

## 🧑‍💻 Local Development

Expand Down
Loading