Skip to content

Commit

Permalink
Add typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
AsPulse committed Dec 12, 2023
1 parent 596c1f4 commit a716b3d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/format-and-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: ./.github/actions/setup-node
- name: Run Prettier
run: pnpm run format:check

eslint:
runs-on: ubuntu-latest
steps:
Expand All @@ -37,4 +37,19 @@ jobs:
turbo-cache-key: lint
- name: Run ESLint
run: pnpm run lint


tsc:
runs-on: ubuntu-latest
steps:
- if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@v3
- if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup turbo
uses: ./.github/actions/setup-turbo
with:
turbo-cache-key: typecheck
- name: Run tsc
run: pnpm run typecheck
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {
"build": "turbo build",
"lint": "turbo lint -- --max-warnings=0",
"typecheck": "turbo typecheck",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,md,json}\"",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,md,json}\""
},
Expand All @@ -12,6 +13,7 @@
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"prettier": "^3.1.0",
"typescript": "^5.3.3",
"turbo": "latest"
},
"packageManager": "pnpm@8.9.0",
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export function hello() {
var a = 3;
return 'Hello world!' == 'Hello world!';
}
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**"]
},
"lint": {}
"lint": {},
"typecheck": {}
}
}

0 comments on commit a716b3d

Please sign in to comment.