Skip to content

Commit 3d4a516

Browse files
authored
fix: add missing loc, comments, tokens properties in JS (#280)
1 parent abc4368 commit 3d4a516

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/hooks/use-ast.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export function useAST() {
2929
try {
3030
const ast = espree.parse(code.javascript, {
3131
range: true,
32+
loc: true,
33+
comment: true,
34+
tokens: true,
3235
// @ts-expect-error mismatch between the latest release of `espree` and `@types/espree`.
3336
ecmaVersion: jsOptions.esVersion,
3437
sourceType: jsOptions.sourceType,

0 commit comments

Comments
 (0)