Skip to content

Commit

Permalink
build: typescript setup simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Jul 28, 2023
1 parent 0996f17 commit ddd450d
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 88 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Lint
run: pnpm lint

- name: Typecheck
run: pnpm typecheck

- name: Test
run: |
pnpm dlx playwright install chromium
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
"packageManager": "pnpm@8.6.2",
"scripts": {
"test": "pnpm -r --parallel run test",
"build": "pnpm -r --parallel run build",
"lint": "eslint . --max-warnings 0 --ext .astro,.ts,.js"
"build": "pnpm -r run build",
"lint": "eslint . --max-warnings 0 --ext .astro,.ts,.js",
"typecheck": "pnpm -r --parallel run typecheck"
},
"devDependencies": {
"@types/node": "^20.4.4",
"@typescript-eslint/parser": "^6.1.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-astro": "^0.27.2",
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"prettier-plugin-astro": "^0.11.0"
"prettier-plugin-astro": "^0.11.0",
"typescript": "^5.1.6"
}
}
31 changes: 14 additions & 17 deletions packages/actions-new-meetup/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
{
"name": "new-meetup-action",
"private": true,
"version": "0.0.1",
"scripts": {
"start": "tsx src/index.ts"
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"date-fns": "^2.30.0",
"tsx": "^3.12.7",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/node": "^20.4.4",
"typescript": "^5.1.6"
}
"name": "new-meetup-action",
"private": true,
"version": "0.0.1",
"scripts": {
"start": "tsx src/index.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"date-fns": "^2.30.0",
"tsx": "^3.12.7",
"zod": "^3.21.4"
}
}
14 changes: 1 addition & 13 deletions packages/actions-new-meetup/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{
"compilerOptions": {
"strict": true,
"sourceMap": true,
"skipLibCheck": true,
"module": "commonjs",
"target": "es6",
"outDir": "dist",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": true
},
"include": ["src"]
"extends": "../../tsconfig.json"
}
27 changes: 12 additions & 15 deletions packages/actions-post-create-pr/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{
"name": "post-create-pr-action",
"private": true,
"version": "0.0.1",
"scripts": {
"start": "tsx src/index.ts"
},
"dependencies": {
"@actions/github": "^5.1.1",
"tsx": "^3.12.7",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/node": "^20.4.4",
"typescript": "^5.1.6"
}
"name": "post-create-pr-action",
"private": true,
"version": "0.0.1",
"scripts": {
"start": "tsx src/index.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@actions/github": "^5.1.1",
"tsx": "^3.12.7",
"zod": "^3.21.4"
}
}
14 changes: 1 addition & 13 deletions packages/actions-post-create-pr/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{
"compilerOptions": {
"strict": true,
"sourceMap": true,
"skipLibCheck": true,
"module": "commonjs",
"target": "es6",
"outDir": "dist",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": true
},
"include": ["src"]
"extends": "../../tsconfig.json"
}
5 changes: 3 additions & 2 deletions packages/site/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
// Astro fails to extend multipel tsconfigs: https://github.com/ifiokjr/tsconfig-resolver/issues/33
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"strictNullChecks": true
"strict": true
}
}
}
39 changes: 14 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"strict": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true
}
}

0 comments on commit ddd450d

Please sign in to comment.