From 951cba8142c0869c1e558241a72f07a5f047f55c Mon Sep 17 00:00:00 2001 From: sand4rt Date: Thu, 20 Oct 2022 22:33:25 +0200 Subject: [PATCH] chore(ct): type check (#18208) --- tests/components/ct-react-vite/package.json | 3 ++- .../ct-react-vite/src/components/Button.tsx | 2 +- tests/components/ct-react-vite/tsconfig.json | 2 +- tests/components/ct-react/package.json | 3 ++- .../ct-react/src/components/Button.tsx | 2 +- tests/components/ct-react/src/tests.spec.tsx | 8 +++---- tests/components/ct-solid/package.json | 3 ++- .../ct-solid/src/components/Button.tsx | 2 +- tests/components/ct-solid/src/tests.spec.tsx | 2 +- tests/components/ct-solid/tsconfig.json | 3 ++- tests/components/ct-svelte-vite/package.json | 2 +- .../src/components/Counter.svelte | 2 +- tests/components/ct-svelte-vite/src/main.ts | 2 +- .../components/ct-svelte-vite/src/svelte.d.ts | 4 ++++ .../ct-svelte-vite/src/tests.spec.ts | 6 ++--- tests/components/ct-svelte-vite/tsconfig.json | 6 +++-- tests/components/ct-svelte/package.json | 7 +++--- .../ct-svelte/src/components/Counter.svelte | 2 +- tests/components/ct-svelte/src/tests.spec.ts | 6 ++--- tests/components/ct-svelte/tsconfig.json | 11 +++++++++ tests/components/ct-vue-cli/.gitignore | 1 + tests/components/ct-vue-cli/jsconfig.json | 20 ---------------- tests/components/ct-vue-cli/package.json | 4 +++- .../ct-vue-cli/src/components/Button.vue | 2 +- .../ct-vue-cli/src/components/Counter.vue | 4 ++-- .../ct-vue-cli/src/notation-jsx.spec.tsx | 13 +++++++---- .../ct-vue-cli/src/notation-vue.spec.ts | 7 +++--- tests/components/ct-vue-cli/tsconfig.app.json | 12 ++++++++++ .../ct-vue-cli/tsconfig.config.json | 8 +++++++ tests/components/ct-vue-cli/tsconfig.json | 14 +++++++++++ .../components/ct-vue-cli/tsconfig.test.json | 11 +++++++++ tests/components/ct-vue-cli/vue.d.ts | 4 ++++ tests/components/ct-vue-vite/.gitignore | 1 + tests/components/ct-vue-vite/env.d.ts | 1 + tests/components/ct-vue-vite/package.json | 7 ++++-- .../ct-vue-vite/src/components/Button.vue | 9 ++------ .../ct-vue-vite/src/components/Counter.vue | 12 ++++------ .../ct-vue-vite/src/components/NamedSlots.vue | 1 - .../ct-vue-vite/src/notation-jsx.spec.tsx | 20 ++++++++-------- .../ct-vue-vite/src/notation-vue.spec.js | 4 ++-- .../ct-vue-vite/src/notation-vue.spec.ts | 10 ++++---- .../components/ct-vue-vite/tsconfig.app.json | 12 ++++++++++ .../ct-vue-vite/tsconfig.config.json | 8 +++++++ tests/components/ct-vue-vite/tsconfig.json | 14 +++++++++++ .../components/ct-vue-vite/tsconfig.test.json | 10 ++++++++ tests/components/ct-vue-vite/vue.d.ts | 1 - tests/components/ct-vue2-cli/.gitignore | 2 +- tests/components/ct-vue2-cli/package.json | 4 +++- .../ct-vue2-cli/playwright/index.ts | 1 - .../ct-vue2-cli/src/components/Button.vue | 2 +- .../ct-vue2-cli/src/components/Counter.vue | 2 +- .../ct-vue2-cli/src/components/HelloWorld.vue | 2 +- .../ct-vue2-cli/src/notation-jsx.spec.tsx | 23 +++++++++++-------- .../ct-vue2-cli/src/notation-vue.spec.ts | 10 ++++---- .../components/ct-vue2-cli/src/shims-vue.d.ts | 4 ++++ tests/components/ct-vue2-cli/src/vue.d.ts | 1 - .../components/ct-vue2-cli/tsconfig.app.json | 12 ++++++++++ .../ct-vue2-cli/tsconfig.config.json | 8 +++++++ tests/components/ct-vue2-cli/tsconfig.json | 14 +++++++++++ .../components/ct-vue2-cli/tsconfig.test.json | 10 ++++++++ tests/components/test-all.spec.js | 6 ++++- 61 files changed, 270 insertions(+), 119 deletions(-) create mode 100644 tests/components/ct-svelte-vite/src/svelte.d.ts create mode 100644 tests/components/ct-svelte/tsconfig.json delete mode 100644 tests/components/ct-vue-cli/jsconfig.json create mode 100644 tests/components/ct-vue-cli/tsconfig.app.json create mode 100644 tests/components/ct-vue-cli/tsconfig.config.json create mode 100644 tests/components/ct-vue-cli/tsconfig.json create mode 100644 tests/components/ct-vue-cli/tsconfig.test.json create mode 100644 tests/components/ct-vue-cli/vue.d.ts create mode 100644 tests/components/ct-vue-vite/env.d.ts create mode 100644 tests/components/ct-vue-vite/tsconfig.app.json create mode 100644 tests/components/ct-vue-vite/tsconfig.config.json create mode 100644 tests/components/ct-vue-vite/tsconfig.json create mode 100644 tests/components/ct-vue-vite/tsconfig.test.json delete mode 100644 tests/components/ct-vue-vite/vue.d.ts create mode 100644 tests/components/ct-vue2-cli/src/shims-vue.d.ts delete mode 100644 tests/components/ct-vue2-cli/src/vue.d.ts create mode 100644 tests/components/ct-vue2-cli/tsconfig.app.json create mode 100644 tests/components/ct-vue2-cli/tsconfig.config.json create mode 100644 tests/components/ct-vue2-cli/tsconfig.json create mode 100644 tests/components/ct-vue2-cli/tsconfig.test.json diff --git a/tests/components/ct-react-vite/package.json b/tests/components/ct-react-vite/package.json index a2d9e02547..4126048dbe 100644 --- a/tests/components/ct-react-vite/package.json +++ b/tests/components/ct-react-vite/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "preview": "vite preview" + "preview": "vite preview", + "typecheck": "tsc --noEmit" }, "dependencies": { "react": "^17.0.2", diff --git a/tests/components/ct-react-vite/src/components/Button.tsx b/tests/components/ct-react-vite/src/components/Button.tsx index 2b44784ac4..8785b878d0 100644 --- a/tests/components/ct-react-vite/src/components/Button.tsx +++ b/tests/components/ct-react-vite/src/components/Button.tsx @@ -4,7 +4,7 @@ type ButtonProps = { title: string; onClick?(props: string): void; className?: string; -} & ButtonHTMLAttributes; +} & Omit, 'onClick'>; export default function Button({ onClick, title, ...attributes }: ButtonProps) { return ) + const messages: string[] = [] + const component = await mount( -