Skip to content

Commit 02d8eb2

Browse files
authored
Merge pull request #19 from MrSmart00/feature/improve-typescript-checks
feat: TypeScript型チェックの強化とCI/CD自動化を実装
2 parents fb4de36 + 4befb01 commit 02d8eb2

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

.github/workflows/typecheck.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: TypeScript Type Check
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
typecheck:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Generate Convex types
27+
run: npx convex codegen --typecheck disable
28+
29+
- name: Run TypeScript type check
30+
run: npm run typecheck
31+
32+
- name: Run build test
33+
run: npm run build

convex/rssQiitaApi.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ function parseAtomEntry(entryText: string): RssArticle | null {
233233
const link = extractAtomLink(entryText);
234234
const id = extractText(entryText, 'id');
235235
const published = extractText(entryText, 'published');
236-
const content = extractText(entryText, 'content');
237236
const authorName = extractAuthorName(entryText);
238237

239238
if (!title || !link) {

convex/tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
/* These settings are not required by Convex and can be modified. */
88
"allowJs": true,
99
"strict": true,
10+
"noUnusedLocals": true,
11+
"noUnusedParameters": true,
1012
"moduleResolution": "Bundler",
1113
"jsx": "react-jsx",
1214
"skipLibCheck": true,

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"dev:convex": "convex dev",
1010
"build": "tsc && vite build",
1111
"preview": "vite preview",
12+
"typecheck": "tsc --noEmit && cd convex && tsc --noEmit",
13+
"typecheck:watch": "concurrently \"tsc --noEmit --watch\" \"cd convex && tsc --noEmit --watch\"",
1214
"convex:codegen": "convex codegen"
1315
},
1416
"repository": {
@@ -18,7 +20,7 @@
1820
"keywords": [],
1921
"author": "",
2022
"license": "MIT",
21-
"type": "commonjs",
23+
"type": "module",
2224
"bugs": {
2325
"url": "https://github.com/MrSmart00/astute-crow/issues"
2426
},

0 commit comments

Comments
 (0)