diff --git a/package.json b/package.json index a0066e9..6143b64 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 ba91cf0..00fe5a4 100644 --- a/src/index.js +++ b/src/index.js @@ -44,3 +44,4 @@ const plugin = { export default plugin; export { JSONSourceCode }; export * from "./languages/json-language.js"; +export * from "./types.js"; diff --git a/src/types.js b/src/types.js new file mode 100644 index 0000000..72fb03b --- /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 60cec9b..455acfb 100644 --- a/tests/types/types.test.ts +++ b/tests/types/types.test.ts @@ -1,9 +1,10 @@ -import json, { JSONSourceCode } from "@eslint/json"; +import json from "@eslint/json"; import type { - JSONSyntaxElement, JSONRuleDefinition, JSONRuleVisitor, -} from "@eslint/json/types"; + JSONSourceCode, + JSONSyntaxElement, +} from "@eslint/json"; import type { AnyNode, ArrayNode,