Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add type check #269

Merged
merged 3 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Type Check

on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
- 'renovate/**'

jobs:
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/pnpm

- name: Type Check
run: npx tsc --noEmit
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"build": "vite build",
"lint": "npx oxlint --tsconfig=tsconfig.json && npx eslint --flag unstable_ts_config",
"format": "npx prettier --write .",
"type-check": "tsc --noEmit",
"test": "vitest --reporter=verbose"
},
"keywords": [
Expand All @@ -54,6 +55,7 @@
"devDependencies": {
"@eslint/js": "^9.13.0",
"@oxc-node/core": "^0.0.15",
"@types/eslint-config-prettier": "^6.11.3",
"@types/node": "^22.7.7",
"@types/shelljs": "^0.8.15",
"@vitest/coverage-v8": "^2.1.3",
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions scripts/sparse-clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SPARSE_CLONE_DIRECTORY,
VERSION_PREFIX,
} from './constants.js';
import { version } from '../package.json';
import packageJson from '../package.json' with { type: 'json' };

/**
* Run this file in CLI like `pnpm run clone`
Expand All @@ -16,7 +16,7 @@ import { version } from '../package.json';
*
*/

const checkoutVersion = process.argv[2] ?? version;
const checkoutVersion = process.argv[2] ?? packageJson.version;

// Function to initialize or reconfigure sparse-checkout
function configureSparseCheckout(cloneDirectory: string) {
Expand Down