diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..cfd0e1e --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,46 @@ +name: Check +on: + workflow_dispatch: + pull_request: + paths: + - "**.ts" + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + type-check: + name: type-check + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "yarn" + cache-dependency-path: "yarn.lock" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Type check + run: yarn type-check + + lint: + name: lint + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "yarn" + cache-dependency-path: "yarn.lock" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Lint + run: yarn lint diff --git a/tsconfig.json b/tsconfig.json index 6630c7e..d1e26ac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,10 @@ "include": [ "src" ], + "exclude": [ + "dist", + "node_modules" + ], "compilerOptions": { "outDir": "build", "target": "ES2019", @@ -14,5 +18,9 @@ "esModuleInterop": true, "moduleResolution": "Node", "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true } }