diff --git a/package.json b/package.json index f539d205..24a405c5 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,6 @@ ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" - }, - "./types": { - "types": "./dist/types.d.ts" } }, "files": [ diff --git a/src/index.js b/src/index.js index eee0bc0d..c5f85e32 100644 --- a/src/index.js +++ b/src/index.js @@ -42,3 +42,4 @@ const plugin = { export default plugin; export { CSSSourceCode }; export * from "./languages/css-language.js"; +export * from "./types.js"; diff --git a/src/types.js b/src/types.js new file mode 100644 index 00000000..72fb03bf --- /dev/null +++ b/src/types.js @@ -0,0 +1,10 @@ +/** + * @fileoverview Dummy file to enable exporting types from the main module. + * @author 루밀LuMir(lumirlumir) + */ + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +export default {}; diff --git a/tests/types/types.test.ts b/tests/types/types.test.ts index dd32c62a..1acd1587 100644 --- a/tests/types/types.test.ts +++ b/tests/types/types.test.ts @@ -1,4 +1,9 @@ -import css, { CSSSourceCode } from "@eslint/css"; +import css from "@eslint/css"; +import type { + CSSRuleDefinition, + CSSRuleVisitor, + CSSSourceCode, +} from "@eslint/css"; import type { Plugin, SourceLocation, SourceRange } from "@eslint/core"; import type { AnPlusB, @@ -52,7 +57,6 @@ import type { CssNodePlain, CssLocationRange, } from "@eslint/css-tree"; -import type { CSSRuleDefinition, CSSRuleVisitor } from "@eslint/css/types"; css satisfies Plugin; css.meta.name satisfies string;