From 535ca681fdd7219820fb1f6f8436f4c170c2cdc1 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Wed, 22 Apr 2020 16:42:46 +0200 Subject: [PATCH] Rename icons, primitives tsconfig to _tsconfig [#21613](https://github.com/WordPress/gutenberg/pull/21613) "hid" TypeScript emitted type declarations for `@wordpress/element` when it was found to conflict with 3rd party type declarations on DefinitelyTyped. Disabling `@wordpress/element` cascaded to require disabling type checking for `@wordpress/icons` and `@wordpress/primitives`, two dependent packages. The lint-staged flow is slightly different from the full `build:package-types` script in that it attempts to do a minimal build in the interest of speed. This flow checks for the presence of a `tsconfig.json` file in the root of the package with changes and runs its package build. While removing the affected packages from the main tsconfig.json did remove them from the primary build, changes to primitives and icons packages will fail because they cannot find the `@wordpress/element` types as was intended in #21613. By renaming the package tsconfig.json files, they are excluded from the lint-staged typechecking as well. --- packages/icons/{tsconfig.json => _tsconfig.json} | 0 packages/primitives/{tsconfig.json => _tsconfig.json} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename packages/icons/{tsconfig.json => _tsconfig.json} (100%) rename packages/primitives/{tsconfig.json => _tsconfig.json} (100%) diff --git a/packages/icons/tsconfig.json b/packages/icons/_tsconfig.json similarity index 100% rename from packages/icons/tsconfig.json rename to packages/icons/_tsconfig.json diff --git a/packages/primitives/tsconfig.json b/packages/primitives/_tsconfig.json similarity index 100% rename from packages/primitives/tsconfig.json rename to packages/primitives/_tsconfig.json