From 64306308ce9b266c897910fddc1a3694bc362771 Mon Sep 17 00:00:00 2001 From: Michael Bradley Date: Sun, 23 Feb 2025 04:55:17 -0500 Subject: [PATCH] Add lint job to push action --- .forgejo/workflows/build.yaml | 21 +++++++++++++++++++-- package.json | 5 ++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index ddecb4f..096e8e2 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -1,9 +1,26 @@ --- -on: [push, pull_request] +on: [push] -name: Build +name: Push jobs: + lint: + name: Lint + runs-on: docker + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + - name: Install dependencies + run: yarn install + - name: Check code formatting + run: yarn lint:prettier + - name: Check code quality + run: yarn lint:eslint + - name: Check types + run: yarn lint:tsc + build: name: Build runs-on: docker diff --git a/package.json b/package.json index a846f38..56e4ef5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "build:targets": "yarn build:client && yarn build:server", "build:client": "tsc -b && vite build --outDir dist/client", "build:server": "tsc -b && vite build --outDir dist/server --ssr src/entry-server.tsx", - "lint": "eslint .", + "lint": "yarn lint:tsc && yarn lint:eslint && yarn lint:prettier", + "lint:prettier": "prettier --check .", + "lint:eslint": "eslint .", + "lint:tsc": "tsc -b --noEmit", "preview": "vite preview" }, "devDependencies": {