From d09eb8c425b9b541e7434ebd85cf44cf714388b2 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Tue, 7 Feb 2023 16:36:26 +0100 Subject: [PATCH] chore(react-migration-v0-v9): enable cross project TS path aliases for improved DX --- .../react-migration-v0-v9/package.json | 2 +- .../components/FormField/FormFieldShim.tsx | 2 +- .../react-migration-v0-v9/tsconfig.json | 3 ++- .../tsconfig.type-check.json | 19 +++++++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 packages/react-components/react-migration-v0-v9/tsconfig.type-check.json diff --git a/packages/react-components/react-migration-v0-v9/package.json b/packages/react-components/react-migration-v0-v9/package.json index 95c947d1071af1..64b3101867c3bf 100644 --- a/packages/react-components/react-migration-v0-v9/package.json +++ b/packages/react-components/react-migration-v0-v9/package.json @@ -19,7 +19,7 @@ "just": "just-scripts", "lint": "just-scripts lint", "test": "jest --passWithNoTests", - "type-check": "tsc -b tsconfig.json", + "type-check": "tsc -b tsconfig.type-check.json", "generate-api": "just-scripts generate-api", "storybook": "start-storybook", "start": "yarn storybook" diff --git a/packages/react-components/react-migration-v0-v9/src/components/FormField/FormFieldShim.tsx b/packages/react-components/react-migration-v0-v9/src/components/FormField/FormFieldShim.tsx index 9b30fa30050a4c..09457d8617b8ed 100644 --- a/packages/react-components/react-migration-v0-v9/src/components/FormField/FormFieldShim.tsx +++ b/packages/react-components/react-migration-v0-v9/src/components/FormField/FormFieldShim.tsx @@ -4,7 +4,7 @@ import { useFieldStyles_unstable, useField_unstable, } from '@fluentui/react-components/unstable'; -import { ObjectShorthandValue } from '@fluentui/react-northstar'; +import type { ObjectShorthandValue } from '@fluentui/react-northstar'; import * as React from 'react'; type WithContent = ObjectShorthandValue> | string; diff --git a/packages/react-components/react-migration-v0-v9/tsconfig.json b/packages/react-components/react-migration-v0-v9/tsconfig.json index 1941a041d46c19..cb0beb41b1488d 100644 --- a/packages/react-components/react-migration-v0-v9/tsconfig.json +++ b/packages/react-components/react-migration-v0-v9/tsconfig.json @@ -1,6 +1,7 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.all.json", "compilerOptions": { + "strict": true, "target": "ES2019", "noEmit": true, "isolatedModules": true, diff --git a/packages/react-components/react-migration-v0-v9/tsconfig.type-check.json b/packages/react-components/react-migration-v0-v9/tsconfig.type-check.json new file mode 100644 index 00000000000000..fde4d991642ae9 --- /dev/null +++ b/packages/react-components/react-migration-v0-v9/tsconfig.type-check.json @@ -0,0 +1,19 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "paths": {} + }, + "include": [], + "files": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + }, + { + "path": "./.storybook/tsconfig.json" + } + ] +}