diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a4750a88..67cba0de 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,3 +33,53 @@ jobs: cd src pnpm install pnpm lint + typecheck: + name: Typecheck + runs-on: ubuntu-latest + if: github.repository_owner == 'wg-easy' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + run_install: false + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + check-latest: true + cache: "pnpm" + + - name: pnpm lint + run: | + cd src + pnpm install + pnpm typecheck + formatcheck: + name: Check format + runs-on: ubuntu-latest + if: github.repository_owner == 'wg-easy' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + run_install: false + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + check-latest: true + cache: "pnpm" + + - name: pnpm lint + run: | + cd src + pnpm install + pnpm format:check diff --git a/src/package.json b/src/package.json index 957ca52c..69bed364 100644 --- a/src/package.json +++ b/src/package.json @@ -14,7 +14,9 @@ "preview": "nuxt preview", "postinstall": "nuxt prepare", "lint": "eslint .", - "format": "prettier . --write" + "format": "prettier . --write", + "format:check": "prettier . --check", + "typecheck": "nuxt typecheck" }, "dependencies": { "@nuxtjs/i18n": "^8.3.3",