diff --git a/app/root.jsx b/app/root.tsx similarity index 100% rename from app/root.jsx rename to app/root.tsx diff --git a/knip.json b/knip.json index d73a20f..0e9acbc 100644 --- a/knip.json +++ b/knip.json @@ -1,6 +1,7 @@ { "$schema": "https://unpkg.com/knip@latest/schema.json", - "entry": ["src/index.ts!"], + "entry": ["app/root.tsx!"], + "ignoreDependencies": ["isbot"], "ignoreExportsUsedInFile": { "interface": true, "type": true }, - "project": ["src/**/*.ts!"] + "project": ["app/**/*.ts!", "app/**/*.tsx!"] } diff --git a/package.json b/package.json index 73b0d86..1ba5559 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "type": "module", "scripts": { + "build": "remix build", "dev": "remix dev -c \"node server.js\"", "format": "prettier .", "lint": "eslint . .*js --max-warnings 0", @@ -35,6 +36,7 @@ }, "devDependencies": { "@types/eslint": "^8.56.2", + "@types/react": "^18.2.57", "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "cspell": "^8.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6c1e3e..2c6ee2b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,6 +34,9 @@ devDependencies: '@types/eslint': specifier: ^8.56.2 version: 8.56.2 + '@types/react': + specifier: ^18.2.57 + version: 18.2.57 '@typescript-eslint/eslint-plugin': specifier: ^7.0.2 version: 7.0.2(@typescript-eslint/parser@7.0.2)(eslint@8.56.0)(typescript@5.3.3) @@ -1971,6 +1974,22 @@ packages: resolution: {integrity: sha512-Yll76ZHikRFCyz/pffKGjrCwe/le2CDwOP5F210KQo27kpRE46U2rDnzikNlVn6/ezH3Mhn46bJMTfeVTtcYMg==} dev: true + /@types/prop-types@15.7.11: + resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} + dev: true + + /@types/react@18.2.57: + resolution: {integrity: sha512-ZvQsktJgSYrQiMirAN60y4O/LRevIV8hUzSOSNB6gfR3/o3wCBFQx3sPwIYtuDMeiVgsSS3UzCV26tEzgnfvQw==} + dependencies: + '@types/prop-types': 15.7.11 + '@types/scheduler': 0.16.8 + csstype: 3.1.3 + dev: true + + /@types/scheduler@0.16.8: + resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} + dev: true + /@types/semver@7.5.7: resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==} dev: true @@ -2937,7 +2956,6 @@ packages: /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - dev: false /data-uri-to-buffer@3.0.1: resolution: {integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==} diff --git a/remix.env.d.ts b/remix.env.d.ts new file mode 100644 index 0000000..dcf8c45 --- /dev/null +++ b/remix.env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/greet.ts b/src/greet.ts deleted file mode 100644 index a0d3b4c..0000000 --- a/src/greet.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { GreetOptions } from "./types.js"; - -export function greet(options: GreetOptions | string) { - const { - logger = console.log.bind(console), - message, - times = 1, - } = typeof options === "string" ? { message: options } : options; - - for (let i = 0; i < times; i += 1) { - logger(message); - } -} diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index a39b40f..0000000 --- a/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./greet.js"; -export * from "./types.js"; diff --git a/src/types.ts b/src/types.ts deleted file mode 100644 index 4f16ae3..0000000 --- a/src/types.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface GreetOptions { - logger?: (message: string) => void; - message: string; - times?: number; -} diff --git a/tsconfig.json b/tsconfig.json index f0eaf1a..8212b56 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,23 @@ { "compilerOptions": { + "baseUrl": ".", "declaration": true, "declarationMap": true, "esModuleInterop": true, + "isolatedModules": true, + "jsx": "react-jsx", "module": "NodeNext", "moduleResolution": "NodeNext", "noEmit": true, "outDir": "lib", + "paths": { + "~/*": ["./app/*"] + }, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "ES2022" }, - "include": ["src"] + "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"] }