Skip to content

Commit

Permalink
fix: require in ESM (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Jun 12, 2024
1 parent d74b09b commit a6bb69e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/ast-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESLint, TSESTree } from "@typescript-eslint/utils";
import { createRequire } from "node:module"

const require = createRequire(import.meta.url)
const eslintRequire = createRequire(require.resolve("eslint"))

export const espreeParser = eslintRequire.resolve('espree');
Expand Down

0 comments on commit a6bb69e

Please sign in to comment.