From 6f93206ad39d50bc60147fa3f3a03f515dbc226f Mon Sep 17 00:00:00 2001 From: Elliott Marquez <5981958+e111077@users.noreply.github.com> Date: Thu, 22 Jun 2023 15:35:56 -0700 Subject: [PATCH] build(catalog): re-enable catalog typechecking This enables typechecking on the catalog so that we catch type build issues in CI next time. Type issues didn't break before since we run our code through esbuild, and it was disabled because of some weird 11ty issues that are fixed in this CL --- .gitignore | 3 ++- catalog/package.json | 6 ++++-- catalog/src/types/is-land.d.ts | 5 +++++ catalog/tsconfig.json | 3 ++- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 catalog/src/types/is-land.d.ts diff --git a/.gitignore b/.gitignore index 8e3dd5b0456..cc3c57be99d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ catalog/site/components/*.md catalog/site/components/images catalog/*.tsbuildinfo catalog/stories/*/ -!catalog/stories/components/ \ No newline at end of file +!catalog/stories/components/ +!catalog/src/types/**/*.d.ts \ No newline at end of file diff --git a/catalog/package.json b/catalog/package.json index b071418ed7b..83b2282e4c1 100644 --- a/catalog/package.json +++ b/catalog/package.json @@ -22,7 +22,8 @@ "build:dev": { "dependencies": [ "build:dev:eleventy", - "build:dev:ts" + "build:dev:ts", + "build:type-check" ] }, "build:dev:eleventy": { @@ -71,7 +72,8 @@ "build:prod": { "dependencies": [ "build:prod:eleventy", - "build:prod:ts" + "build:prod:ts", + "build:type-check" ] }, "build:prod:eleventy": { diff --git a/catalog/src/types/is-land.d.ts b/catalog/src/types/is-land.d.ts new file mode 100644 index 00000000000..a231b5669ae --- /dev/null +++ b/catalog/src/types/is-land.d.ts @@ -0,0 +1,5 @@ +declare module '@11ty/is-land' { + export class Island extends HTMLElement { + forceFallback(): void; + } +} \ No newline at end of file diff --git a/catalog/tsconfig.json b/catalog/tsconfig.json index d62c0783e1b..1ee8c16b41e 100644 --- a/catalog/tsconfig.json +++ b/catalog/tsconfig.json @@ -12,7 +12,8 @@ "useDefineForClassFields": false, "forceConsistentCasingInFileNames": true, "noEmit": true, - "skipLibCheck": true + "skipLibCheck": true, + "types": [] }, "include": ["src/**/*", "stories/*", "stories/components"], "exclude": []