Skip to content

Commit

Permalink
Merge pr #62 from Resilient-Labs/feature/prettier-github-action; issue
Browse files Browse the repository at this point in the history
…#21

#21 Github action for running prettier format
  • Loading branch information
aidan-diaz authored Jan 8, 2025
2 parents d20ba90 + 716792c commit beac9db
Show file tree
Hide file tree
Showing 27 changed files with 3,407 additions and 502 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/prettier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Code Quality checks
on:
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
prettier:
name: Prettier
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [18]

permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: pnpm install -D
- name: Fix formatting with Prettier
run: pnpm format
- name: Check formatting with Prettier
run: pnpm check
- name: Auto-commit changes
uses: stefanzweifel/git-auto-commit-action@v5
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ npm run dev
The backend server is loading from `http://localhost:3000`

### Environment Variables

One ENV goes inside of the config file inside the server and the other ENV is in the root

```
Expand All @@ -45,4 +46,4 @@ CLERK_SECRET_KEY=clerk_secret_key_here
CLERK_PUBLISHABLE_KEY=clerk_publishable_key_here
```

Front end needs "VITE_" prefixing all keys
Front end needs "VITE\_" prefixing all keys
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview",
"format": "prettier --write \"**/*.{ts,tsx,js,md,mdx,css,yaml}\"",
"check": "prettier --check \"**/*.{ts,tsx,js,md,mdx,css,yaml}\""
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,md,mdx,css}\"",
"check": "prettier --check \"**/*.{ts,tsx,js,jsx,md,mdx,css}\""
},
"dependencies": {
"@clerk/clerk-react": "^5.21.0",
Expand Down
Loading

0 comments on commit beac9db

Please sign in to comment.