Skip to content

Commit 915837c

Browse files
authored
feat: export types from main entry point (#520)
1 parent 65251ec commit 915837c

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,4 @@ recommendedPlugins.markdown = processorPlugins.markdown = plugin;
135135

136136
export default plugin;
137137
export { MarkdownSourceCode };
138+
export * from "./types.js";

src/types.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @fileoverview Dummy file to enable exporting types from the main module.
3+
* @author 루밀LuMir(lumirlumir)
4+
*/
5+
6+
//-----------------------------------------------------------------------------
7+
// Exports
8+
//-----------------------------------------------------------------------------
9+
10+
export default {};

tests/types/types.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
import markdown, { MarkdownSourceCode } from "@eslint/markdown";
2-
import type { SourceLocation, SourceRange } from "@eslint/core";
1+
import markdown from "@eslint/markdown";
32
import type {
43
MarkdownRuleDefinition,
54
MarkdownRuleVisitor,
5+
MarkdownSourceCode,
66
Toml,
77
Json,
88
RangeMap,
99
Block,
10-
} from "@eslint/markdown/types";
11-
import { ESLint, Linter } from "eslint";
12-
import { Position } from "unist";
10+
} from "@eslint/markdown";
11+
import type { SourceLocation, SourceRange } from "@eslint/core";
12+
import type { ESLint, Linter } from "eslint";
13+
import type { Position } from "unist";
1314
import type {
1415
// Nodes (abstract)
1516
Node,

0 commit comments

Comments
 (0)