From 5514d461a1f921845611c81cce51a9b044560020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 9 Dec 2025 16:39:28 +0900 Subject: [PATCH] ci: run `arethetypeswrong` in CI --- .github/workflows/ci.yml | 22 +++++++++++++++++----- package.json | 2 ++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c8362b6..7cb02856 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,7 @@ jobs: run: npm install eslint@${{ matrix.eslint }} - name: Test run: npm run test + test_types: name: Test Types runs-on: ubuntu-latest @@ -84,10 +85,23 @@ jobs: node-version: "lts/*" - name: Install dependencies run: npm install - - name: Build - run: npm run build - name: Check Types run: npm run test:types + + are-the-types-wrong: + name: Are the types wrong? + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "lts/*" + - name: Install Packages + run: npm install + - name: Check validity of type definitions + run: npm run lint:types + jsr_test: name: Verify JSR Publish runs-on: ubuntu-latest @@ -99,6 +113,4 @@ jobs: - name: Install Packages run: npm install - name: Run --dry-run - run: | - npm run build - npm run test:jsr + run: npm run test:jsr diff --git a/package.json b/package.json index f9d07da8..56104bdb 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "scripts": { "lint": "eslint && eslint -c eslint.config-content.js", "lint:fix": "eslint --fix && eslint --fix -c eslint.config-content.js", + "lint:types": "attw --pack --profile esm-only", "lint:unused": "knip", "fmt": "prettier --write .", "fmt:check": "prettier --check .", @@ -74,6 +75,7 @@ "test:types": "tsc -p tests/types/tsconfig.json" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.18.2", "@eslint/js": "^9.39.1", "@eslint/json": "^0.14.0", "@types/mdast": "^4.0.4",