diff --git a/tests/fixtures/no-missing/node_modules/types-only/package.json b/tests/fixtures/no-missing/node_modules/types-only/package.json new file mode 100644 index 00000000..2c8dc4f4 --- /dev/null +++ b/tests/fixtures/no-missing/node_modules/types-only/package.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": {"types": "./types.d.ts"} + } +} diff --git a/tests/fixtures/no-missing/node_modules/types-only/types.d.ts b/tests/fixtures/no-missing/node_modules/types-only/types.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/tests/lib/rules/no-missing-import.js b/tests/lib/rules/no-missing-import.js index af2dc125..de26a878 100644 --- a/tests/lib/rules/no-missing-import.js +++ b/tests/lib/rules/no-missing-import.js @@ -286,6 +286,17 @@ ruleTester.run("no-missing-import", rule, { env: { node: true }, }, + // type only tests + { + filename: fixture("test.ts"), + parser: path.join( + __dirname, + "../../../node_modules/@typescript-eslint/parser" + ), + code: "import type d from 'types-only';", + env: { node: true }, + }, + // import() ...(DynamicImportSupported ? [