From 59d6a3f174dc6787202db388763cb36da516d5f2 Mon Sep 17 00:00:00 2001 From: Adi Dahiya Date: Wed, 5 Oct 2022 08:26:47 -0400 Subject: [PATCH] Fix TS compilation error due to needless `file-entry-cache` import (#6393) This type import was added in https://github.com/stylelint/stylelint/pull/6356, but during code review that PR was refactored to obviate the `file-entry-cache` types in the public API. The import was never removed. Keeping the import here results in [compilation errors](https://app.circleci.com/pipelines/github/palantir/blueprint/3156/workflows/9eda97ec-3a2f-4aa6-aa6c-89d5b65b8491/jobs/61694) for downstream consumers: ``` ../../node_modules/stylelint/types/stylelint/index.d.ts:5:39 - error TS7016: Could not find a declaration file for module 'file-entry-cache'. '/home/circleci/project/node_modules/file-entry-cache/cache.js' implicitly has an 'any' type. Try `npm i --save-dev @types/file-entry-cache` if it exists or add a new declaration (.d.ts) file containing `declare module 'file-entry-cache';` 5 import type * as fileEntryCache from 'file-entry-cache' ``` --- .changeset/fix-unused-type-import.md | 5 +++++ types/stylelint/index.d.ts | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-unused-type-import.md diff --git a/.changeset/fix-unused-type-import.md b/.changeset/fix-unused-type-import.md new file mode 100644 index 0000000000..385955e386 --- /dev/null +++ b/.changeset/fix-unused-type-import.md @@ -0,0 +1,5 @@ +--- +"stylelint": patch +--- + +Fixed: TS compilation error due to needless `file-entry-cache` import diff --git a/types/stylelint/index.d.ts b/types/stylelint/index.d.ts index 940ab88106..1a12c44f81 100644 --- a/types/stylelint/index.d.ts +++ b/types/stylelint/index.d.ts @@ -2,7 +2,6 @@ declare module 'stylelint' { import type * as PostCSS from 'postcss'; import type { GlobbyOptions } from 'globby'; import type { cosmiconfig } from 'cosmiconfig'; - import type * as fileEntryCache from 'file-entry-cache'; namespace stylelint { export type Severity = 'warning' | 'error';