From 52b3d6f87174937523e9d0b4af1a1a753e34e923 Mon Sep 17 00:00:00 2001 From: robonen Date: Tue, 17 Jun 2025 15:58:20 +0700 Subject: [PATCH] feat(ci): add CI workflow for ESLint checks and type checking --- .github/workflows/ci.yaml | 32 ++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..7a86c59 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,32 @@ +name: CI + +on: [push, pull_request] + +jobs: + lint: + name: ESLint Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: pnpm + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run ESLint + run: pnpm run lint:check + + - name: Type check + run: pnpm run type:check diff --git a/package.json b/package.json index dd0102d..a5443e0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "preview": "vite preview", "test:unit": "vitest", "type:check": "vue-tsc --build", - "lint:check": "eslint ." + "lint:check": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@robonen/stdlib": "^0.0.7",