Skip to content

Commit 0fdaf9f

Browse files
committed
feat: export a parse function for compatibility usage
see also: import-js/eslint-plugin-import#1433
1 parent c096483 commit 0fdaf9f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rxts/eslint-plugin-mdx",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "ESLint Parser/Plugin for MDX",
55
"repository": "[email protected]:rx-ts/eslint-plugin-mdx.git",
66
"author": "JounQin <[email protected]>",

src/parser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ export const parseForESLint = (
128128

129129
return {
130130
ast,
131-
parserServices: services,
132131
services,
133132
} as Linter.ESLintParseResult
134133
}
134+
135+
export const parse = (code: string, options: Linter.ParserOptions = {}) =>
136+
parseForESLint(code, options).ast

0 commit comments

Comments
 (0)