Skip to content
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
83 changes: 0 additions & 83 deletions .github/checks.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Checks

on:
pull_request: # push is handled in the deploy workflows
branches: ["**"]
workflow_call:

concurrency:
# Skip concurrency restriction when called from another workflow
# This prevents deadlocks between parent workflow and this one
group:
${{ github.workflow_ref != '' && format('{0}-{1}', github.workflow,
github.run_id) || format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true

jobs:
verify:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
command: [check-types, check-format, check-circular, lint, test]

name: ${{ matrix.command }}

steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Enable corepack
run: corepack enable pnpm

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# First tries exact match with lock file hash. If not found,
# falls back to any cache starting with 'pnpm-store-'.
# This way we get exact cache on repeated runs, but can still
# use older cache as starting point when dependencies change.
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run ${{ matrix.command }}
run: pnpm ${{ matrix.command }}
36 changes: 3 additions & 33 deletions apps/web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
// @ts-check
/* eslint-disable */
import { FlatCompat } from "@eslint/eslintrc";
import baseConfig from "@repo/eslint-config/base";
import tseslint from "typescript-eslint";
import config from "@repo/eslint-config/next-js";

const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
});

export default tseslint.config(
...baseConfig,
...compat.config({
extends: ["next"],
settings: {
next: {
rootDir: "apps/web/", // required for monorepos
},
},
}),
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
},
}
);
/** @type {import("eslint").Linter.Config} */
export default config;
14 changes: 8 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"check-types": "tsc --noEmit",
"check-circular": "madge --circular --extensions ts ./src --ts-config ./tsconfig.json",
"dev": "next dev",
"build": "next build",
"clean": "del-cli .next tsconfig.tsbuildinfo",
Expand All @@ -15,27 +16,28 @@
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-slot": "^1.1.1",
"@repo/common": "workspace:*",
"@typed-firestore/react": "1.0.0",
"@typed-firestore/react": "1.1.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"firebase": "^11.2.0",
"lucide-react": "^0.474.0",
"firebase": "^12.1.0",
"lucide-react": "^0.539.0",
"next": "^15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.6.0",
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.7.3"
"typescript": "^5.9.2"
},
"devDependencies": {
"@codecompose/typescript-config": "^1.2.0",
"@repo/eslint-config": "workspace:*",
"@types/node": "^22.10.10",
"@types/node": "^24.2.1",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"autoprefixer": "^10.4.20",
"del-cli": "^6.0.0",
"eslint-config-next": "^15.1.6",
"madge": "^8.0.0",
"postcss": "^8.5.1",
"tailwindcss": "^3.4.17"
}
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/components/ui/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import * as React from "react";

import { cn } from "~/lib/utils";

/* eslint-disable react/prop-types */

const Table = React.forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
Expand Down
8 changes: 2 additions & 6 deletions apps/web/src/lib/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ let db: Firestore | undefined;
let auth: Auth | undefined;

export function getFirebaseApp(): FirebaseApp {
if (!app) {
app = initializeApp(firebaseConfig);
}
app ??= initializeApp(firebaseConfig);
return app;
}

Expand All @@ -37,8 +35,6 @@ export function getFirestoreDb(): Firestore {
}

export function getFirebaseAuth(): Auth {
if (!auth) {
auth = getAuth(getFirebaseApp());
}
auth ??= getAuth(getFirebaseApp());
return auth;
}
18 changes: 0 additions & 18 deletions apps/web/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,6 @@
],
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**"]
},
"lint": {
"dependsOn": ["^lint"]
},
"test": {
"dependsOn": ["^build"],
"outputs": ["coverage/**"],
"inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts", "test/**/*.tsx"]
},
"check-types": {
"dependsOn": ["^check-types"]
},
"clean": {
"dependsOn": ["^clean"]
},
"dev": {
"cache": false,
"persistent": true
}
}
}
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dist"
],
"main": "dist/index.js",
"packageManager": "pnpm@9.0.4+sha256.caa915eaae9d9aefccf50ee8aeda25a2f8684d8f9d5c6e367eaf176d97c1f89e",
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
"author": "Thijs Koerselman",
"license": "MIT",
"publishConfig": {
Expand All @@ -28,27 +28,29 @@
"url": "https://github.com/0x80/mono-ts"
},
"scripts": {
"check-types": "turbo run check-types",
"build": "turbo run build",
"build:fns": "turbo run build --filter=@repo/fns",
"build:api": "turbo run build --filter=@repo/api",
"clean": "turbo run clean",
"dev": "turbo run dev",
"check-types": "turbo check-types --continue",
"check-circular": "turbo check-circular --continue",
"build": "turbo build",
"build:fns": "turbo build --filter=@repo/fns",
"build:api": "turbo build --filter=@repo/api",
"clean": "turbo clean",
"dev": "turbo dev",
"deploy": "firebase deploy",
"watch": "turbo watch build --filter=@repo/core --filter=@repo/fns --filter=@repo/api",
"lint": "turbo run lint --parallel",
"test": "turbo run test -- --watch false",
"lint": "turbo lint",
"test": "turbo test -- --watch false",
"format": "prettier --write .",
"check-format": "prettier --check .",
"emulate": "firebase emulators:start --project demo-mono-ts",
"db:get-indexes": "firebase firestore:indexes > firestore.indexes.json"
},
"devDependencies": {
"firebase-tools-with-isolate": "13.29.1-2",
"firebase-tools-with-isolate": "14.10.1",
"prettier": "^3.4.2",
"prettier-plugin-jsdoc": "^1.3.2",
"turbo": "^2.3.4",
"typescript": "^5.7.3",
"vercel": "^39.3.0",
"typescript": "^5.9.2",
"vercel": "^44.7.3",
"vitest": "^3.0.4"
}
}
17 changes: 3 additions & 14 deletions packages/common/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// @ts-check
import base from "@repo/eslint-config/base";
import tseslint from "typescript-eslint";
import config from "@repo/eslint-config/library";

export default tseslint.config([
...base,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
allowDefaultProject: true,
},
},
},
]);
/** @type {import("eslint").Linter.Config} */
export default config;
9 changes: 5 additions & 4 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
],
"scripts": {
"check-types": "tsc --noEmit",
"check-circular": "madge --circular --extensions ts ./src --ts-config ./tsconfig.json",
"test": "vitest",
"build": "bunchee --sourcemap --target es2022",
"clean": "del-cli dist tsconfig.tsbuildinfo",
"lint": "eslint src --flag unstable_config_lookup_from_file --max-warnings 0",
"lint": "eslint src --max-warnings 0",
"coverage": "vitest run --coverage"
},
"license": "MIT",
"dependencies": {
"firebase": "^11.2.0",
"firebase": "^12.1.0",
"remeda": "^2.20.0"
},
"devDependencies": {
Expand All @@ -32,9 +33,9 @@
"bunchee": "^6.6.0",
"del-cli": "^6.0.0",
"eslint": "^9.19.0",
"madge": "^8.0.0",
"prettier": "^3.4.2",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"typescript": "^5.9.2",
"vitest": "^3.0.4"
}
}
Loading