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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pnpm-lock.yaml
pnpm-workspace.yaml
2 changes: 2 additions & 0 deletions apps/web/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.next
public
4 changes: 2 additions & 2 deletions apps/web/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "app/globals.css",
"css": "src/app/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "~/components",
"utils": "~/lib/utils"
}
}
}
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"typescript": "^5.6.3"
},
"devDependencies": {
"@codecompose/typescript-config": "^1.1.3",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"autoprefixer": "^10.4.20",
Expand Down
1 change: 0 additions & 1 deletion apps/web/public/next.svg

This file was deleted.

1 change: 0 additions & 1 deletion apps/web/public/vercel.svg

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Button } from "~/components/ui/button.jsx";
import { Button } from "~/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "~/components/ui/card.jsx";
} from "~/components/ui/card";

export default function CardWithAction(props: {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Counter } from "@repo/common";
import { doc } from "firebase/firestore";
import { useTypedDocument } from "~/lib/firestore.js";
import { refs } from "~/refs.js";
import KeyValueList from "./key-value-list.jsx";
import { useTypedDocument } from "~/lib/firestore";
import { refs } from "~/refs";
import KeyValueList from "./key-value-list";

export function CounterView(props: { counterId: string }) {
const [counter, isLoading] = useTypedDocument<Counter>(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import type { FsTimestamp } from "@repo/common";
import { isDefined } from "@repo/common";
import { Timestamp } from "firebase/firestore";
import {
Table,
TableBody,
TableCell,
TableRow,
} from "~/components/ui/table.jsx";
import { Table, TableBody, TableCell, TableRow } from "~/components/ui/table";

type FsValue = string | number | boolean | null | FsTimestamp;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions apps/web/app/page.tsx → apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import { areWeThereYet } from "@repo/common";
import { CardDescription } from "~/components/ui/card.jsx";
import { add, multiply, reset } from "~/lib/api.js";
import CardWithAction from "./components/card-with-action.jsx";
import { CounterView } from "./components/counter-view.jsx";
import { CardDescription } from "~/components/ui/card";
import { add, multiply, reset } from "~/lib/api";
import CardWithAction from "./components/card-with-action";
import { CounterView } from "./components/counter-view";

export default function Home() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";

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

const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-zinc-950 disabled:pointer-events-none disabled:opacity-50 dark:focus-visible:ring-zinc-300",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";

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

const Card = React.forwardRef<
HTMLDivElement,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";

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

const Table = React.forwardRef<
HTMLTableElement,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions apps/web/src/lib/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./cn";
export * from "./fetch";
2 changes: 1 addition & 1 deletion apps/web/refs.ts → apps/web/src/refs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { collection } from "firebase/firestore";
import { db } from "~/lib/firebase.js";
import { db } from "~/lib/firebase";

export const refs = {
counters: collection(db, "counters"),
Expand Down
4 changes: 2 additions & 2 deletions apps/web/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('tailwindcss').Config} */
/** @type {import("tailwindcss").Config} */
module.exports = {
darkMode: ["class"],
content: ["./components/**/*.{ts,tsx}", "./app/**/*.{ts,tsx}"],
content: ["./src/components/**/*.{ts,tsx}", "./src/app/**/*.{ts,tsx}"],
theme: {
container: {
center: true,
Expand Down
30 changes: 6 additions & 24 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
{
"compilerOptions": {
"target": "es2020",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"~/*": ["./*"]
"extends": "@codecompose/typescript-config/nextjs.json",
"include": ["src", ".next/types/**/*.ts"],
"references": [
{
"path": "../../packages/common"
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
]
}
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"firebase-functions": "^5.1.1"
},
"devDependencies": {
"@codecompose/typescript-config": "^1.1.3",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "^22.7.5",
Expand Down
1 change: 0 additions & 1 deletion packages/backend/src/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export type { Firestore } from "firebase-admin/firestore";

export type { UpdateData } from "firebase-admin/firestore";


if (!admin.apps.length) {
admin.initializeApp();

Expand Down
5 changes: 2 additions & 3 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export type * from './firebase';
export type * from './utils/index.js';

export type * from "./firebase";
export type * from "./utils/index.js";
4 changes: 2 additions & 2 deletions packages/backend/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./assertions.js";
export * from "./timer.js";
export * from "./assertions";
export * from "./timer";
// Compare this snippet from packages/backend/src/utils/index.ts:
15 changes: 5 additions & 10 deletions packages/backend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"extends": "@repo/typescript-config/library.json",
"compilerOptions": {
"target": "esnext",
"rootDir": "src",
"outDir": "dist",
"composite": true,
"paths": {
"~/*": ["./*"]
"extends": "@codecompose/typescript-config/library.json",
"references": [
{
"path": "../common"
}
},
"include": ["src"]
]
}
4 changes: 1 addition & 3 deletions packages/backend/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ export default defineConfig({
*/
"utils/index": "src/utils/index.ts",

/**
* Files
*/
/** Files */
firebase: "src/firebase.ts",
},
format: ["esm"],
Expand Down
1 change: 1 addition & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"remeda": "^2.15.0"
},
"devDependencies": {
"@codecompose/typescript-config": "^1.1.3",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"eslint": "^8.57.1",
Expand Down
4 changes: 1 addition & 3 deletions packages/common/src/document-types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* This file contains Firestore document types
*/
/** This file contains Firestore document types */

import type { Timestamp } from "firebase/firestore";

Expand Down
6 changes: 3 additions & 3 deletions packages/common/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./are-we-there-yet.js";
export * from "./document-types.js";
export * from "./utils/index.js";
export * from "./are-we-there-yet";
export * from "./document-types";
export * from "./utils";
10 changes: 5 additions & 5 deletions packages/common/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from "./get-error-message.js";
export * from "./invariant.js";
export * from "./is-empty.js";
export * from "./is-present.js";
export * from "./unique.js";
export * from "./get-error-message";
export * from "./invariant";
export * from "./is-empty";
export * from "./is-present";
export * from "./unique";
3 changes: 2 additions & 1 deletion packages/common/src/utils/is-empty.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Arrays only. Typically isEmpty does more than that, but we don't need it here.
* Arrays only. Typically isEmpty does more than that, but we don't need it
* here.
*/
export function isEmpty<T>(array: T[]): array is [] {
return array.length === 0;
Expand Down
4 changes: 1 addition & 3 deletions packages/common/src/utils/is-present.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* Copied from ts-is-present
*/
/** Copied from ts-is-present */
export function isPresent<T>(t: T | undefined | null | void): t is T {
return t !== undefined && t !== null;
}
Expand Down
9 changes: 1 addition & 8 deletions packages/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "@repo/typescript-config/library.json",
"compilerOptions": {
"target": "esnext",
"rootDir": "src",
"outDir": "dist",
"composite": true
},
"include": ["src"]
"extends": "@codecompose/typescript-config/library.json"
}
1 change: 1 addition & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
],
"license": "MIT",
"devDependencies": {
"@codecompose/typescript-config": "^1.1.3",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.1",
"@vercel/style-guide": "^6.0.0",
Expand Down
18 changes: 0 additions & 18 deletions packages/typescript-config/base.json

This file was deleted.

10 changes: 0 additions & 10 deletions packages/typescript-config/library.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/typescript-config/nextjs.json

This file was deleted.

9 changes: 0 additions & 9 deletions packages/typescript-config/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/typescript-config/service.json

This file was deleted.

Loading