From 8583943b547640cf1760c6e25b972566a1d33c23 Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Fri, 13 Sep 2024 16:03:25 +0200 Subject: [PATCH] Upgrades --- .gitignore | 7 +++- .vscode/settings.json | 8 ++++ plan.json | 70 ------------------------------- renovate.json | 6 ++- scripts/setup.ts | 3 -- vite.config.ts => vite.config.mts | 2 - 6 files changed, 18 insertions(+), 78 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 plan.json delete mode 100644 scripts/setup.ts rename vite.config.ts => vite.config.mts (76%) diff --git a/.gitignore b/.gitignore index 59ecb4b..bd2eb9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ node_modules -.vscode -tsconfig.temp.json \ No newline at end of file +tsconfig.temp.json +dist +*.tsbuildinfo +*.prompt.* +.vscode/*.code-snippets \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b6621bd --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, + "github.copilot.enable": { + "*": false, + }, + "explorer.sortOrder": "mixed", +} \ No newline at end of file diff --git a/plan.json b/plan.json deleted file mode 100644 index 6aa33f7..0000000 --- a/plan.json +++ /dev/null @@ -1,70 +0,0 @@ -[ - { - "text": "Typing components", - "deps": [] - }, - { - "text": "Typing children", - "deps": ["Typing components"] - }, - { - "text": "Typing components which inherit from native components", - "deps": ["Typing components"] - }, - { - "text": "Typing onChange handlers", - "deps": [] - }, - { - "text": "Typing hooks", - "deps": [] - }, - { - "text": "Tuple return types from custom hooks", - "deps": [] - }, - { - "text": "useReducer", - "deps": [] - }, - { - "text": "Typing createContext", - "deps": [] - }, - { - "text": "useState overloads", - "deps": [] - }, - { - "text": "useRef overloads - For HTML elements - For values", - "deps": [] - }, - { - "text": "forwardRef", - "deps": [] - }, - { - "text": "Discriminated union props", - "deps": [] - }, - { - "text": "Generic components", - "deps": ["Typing components"] - }, - { - "text": "Generic custom hooks", - "deps": ["Typing hooks"] - }, - { - "text": "useState with a generic", - "deps": ["Generic custom hooks"] - }, - { - "text": "Function overloads in custom hooks", - "deps": ["Generic custom hooks"] - }, - { - "text": "Higher-order components", - "deps": [] - } -] diff --git a/renovate.json b/renovate.json index 1c0166f..29b50a8 100644 --- a/renovate.json +++ b/renovate.json @@ -7,9 +7,13 @@ "excludePackagePatterns": [ "typescript", "vitest", + "jsdom", + "prettier", + "vite-tsconfig-paths", "react", "@types/react", - "@total-typescript/exercise-cli" + "@total-typescript/exercise-cli", + "zod" ], "enabled": false } diff --git a/scripts/setup.ts b/scripts/setup.ts deleted file mode 100644 index 354d20d..0000000 --- a/scripts/setup.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { fetch } from "cross-fetch"; - -global.fetch = fetch; diff --git a/vite.config.ts b/vite.config.mts similarity index 76% rename from vite.config.ts rename to vite.config.mts index 251dac0..c5cfc0c 100644 --- a/vite.config.ts +++ b/vite.config.mts @@ -1,11 +1,9 @@ import { defineConfig } from "vitest/config"; import tsconfigPaths from "vite-tsconfig-paths"; -import path from "path"; export default defineConfig({ test: { include: ["src/**/*{problem,solution,explainer}*.{ts,tsx}"], - setupFiles: [path.resolve(__dirname, "scripts/setup.ts")], passWithNoTests: true, environment: "jsdom", },