Fix pnpm command and first tsx example in typescript.mdx (#943) #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🔍 Lint / Type Checks | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "pnpm" | |
- run: pnpm i | |
- uses: actions/cache/save@v4 | |
with: | |
path: | | |
node_modules | |
~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
typecheck: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "pnpm" | |
- uses: actions/cache/restore@v4 | |
with: | |
path: | | |
node_modules | |
~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Generate virtual modules | |
run: pnpm sync | |
- name: TypeScript check | |
run: pnpm check:types | |
lint: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "pnpm" | |
- uses: actions/cache/restore@v4 | |
with: | |
path: | | |
node_modules | |
~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: ESLint check | |
run: pnpm check:lint |