Skip to content

Commit

Permalink
feat: update to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorusclarence committed Jan 7, 2024
1 parent 637bc65 commit 9f36eca
Show file tree
Hide file tree
Showing 9 changed files with 7,298 additions and 6,722 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,31 @@ concurrency:

jobs:
lint:
name: ⬣ ESLint, ʦ TypeScript, and 💅 Prettier
name: ⬣ ESLint, ʦ TypeScript, 💅 Prettier, and 🃏 Test
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: 🤌 Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: 📥 Download deps
uses: u0reo/npm-install@fix/restore-failure
with:
useRollingCache: true
run: pnpm install --frozen-lockfile

- name: 🔬 Lint
run: yarn lint:strict
run: pnpm run lint:strict

- name: 🔎 Type check
run: yarn typecheck
run: pnpm run typecheck

- name: 💅 Prettier check
run: yarn format:check
run: pnpm run format:check
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn
pnpm install
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
npx lint-staged
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ yarn-error.log*
.vercel

# changelog
CHANGELOG.md
CHANGELOG.md

pnpm-lock.yaml
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ cd ./theodorusclarence.com
cp .env.example .env.local

# Install the dependencies
yarn
pnpm

# Run the development server
yarn dev
pnpm dev
```

You can now open up `http://localhost:3000` and start writing code!
Expand All @@ -58,11 +58,11 @@ you can change the `isProd` into `true` to turn the feature on, but expect some

When writing your code, please try to follow the existing code style.

Your code will be automatically linted and formatted before each commit. However, if you want to manually lint and format, use the provided yarn scripts.
Your code will be automatically linted and formatted before each commit. However, if you want to manually lint and format, use the provided pnpm scripts.

```sh
yarn lint:fix
yarn format
pnpm lint:fix
pnpm format
```

You also have to follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for the commit message.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "eslint src --fix && yarn format",
"lint:fix": "eslint src --fix && pnpm format",
"lint:strict": "eslint --max-warnings=0 src",
"typecheck": "tsc --noEmit --incremental false",
"format": "prettier -w .",
Expand Down
Loading

0 comments on commit 9f36eca

Please sign in to comment.