Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .github/rulesets/gitflow-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
"context": "Linting / Run ESLint",
"integration_id": 15368
},
{
"context": "Linting / Run typecheck",
"integration_id": 15368
},
{
"context": "Unit Tests / Run unit tests",
"integration_id": 15368
Expand Down
4 changes: 4 additions & 0 deletions .github/rulesets/gitflow-production.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
"context": "Linting / Run ESLint",
"integration_id": 15368
},
{
"context": "Linting / Run typecheck",
"integration_id": 15368
},
{
"context": "Unit Tests / Run unit tests",
"integration_id": 15368
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/node-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,24 @@ jobs:

- name: Run ESLint
run: npm run lint

typecheck:
name: "Run typecheck"
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: package.json
cache: "npm"
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Run typecheck
run: npm run typecheck
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ pnpm-debug.log*

# Generated/copied files
public/data/**/*

# TypeScript build info
*.tsbuildinfo
tsconfig/*.tsbuildinfo
.tsbuildcache/
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint:watch": "chokidar . --ignore \".git/**\" --ignore \"node_modules/**\" -c \"npm run lint -- --max-warnings=0 && echo '✔ Lint check complete (no errors or warnings)'\"",
"typecheck": "tsc -b",
"typecheck:watch": "tsc -b -w",
"format": "prettier --write .",
"format:check": "prettier --check .",
"format:watch": "chokidar . --ignore \".git/**\" --ignore \"node_modules/**\" -c \"prettier --check .\"",
Expand Down
3 changes: 1 addition & 2 deletions scripts/build-timeseries-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// - label := label | name
//
// Output:
// - Writes src/data/index.json with { byPathway, byDataset, schema }.
// - Writes src/data/index.json with { byPathway, byDataset }.

import { promises as fs } from "node:fs";
import * as path from "node:path";
Expand Down Expand Up @@ -414,7 +414,6 @@ async function main() {
export type TimeseriesIndex = {
byPathway: Record<string, TimeseriesIndexItem[]>;
byDataset: Record<string, { datasetId: string; pathwayIds: string[]; label?: string; path: string; summary?: unknown }>;
schema: { version: number; generatedAt: string };
};
export const index: TimeseriesIndex = ${JSON.stringify(out, null, 2)} as const;
export default index;
Expand Down
1 change: 0 additions & 1 deletion src/data/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export type TimeseriesIndex = {
summary?: unknown;
}
>;
schema: { version: number; generatedAt: string };
};
export const index: TimeseriesIndex = {
byPathway: {
Expand Down
1 change: 0 additions & 1 deletion src/utils/timeseriesIndex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe("timeseriesIndex helpers", () => {
path: "/data/BAS-2024_timeseries.json",
},
},
schema: { version: 1, generatedAt: new Date().toISOString() },
};

expect(datasetsForPathway(idx, "ACE-BAS-2024")).toEqual([
Expand Down
7 changes: 6 additions & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true
"strict": true,
"composite": true,
"exactOptionalPropertyTypes": true,
"noUncheckedIndexedAccess": true,
"noPropertyAccessFromIndexSignature": true,
"tsBuildInfoFile": ".tsbuildcache/app.tsbuildinfo"
},
"include": ["src"]
}
7 changes: 5 additions & 2 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
"isolatedModules": true,
"noEmit": true,
"strict": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"composite": true,
"tsBuildInfoFile": ".tsbuildcache/node.tsbuildinfo"
},
"include": [
"vite.config.ts",
"eslint.config.ts",
"vitest.config.ts",
"postcss.config.ts",
"tailwind.config.ts",
"src/utils/*.ts"
"src/utils/*.ts",
"src/data/index.gen.ts"
]
}
Loading