Skip to content

Commit 9926a11

Browse files
authored
fix: import path (#148)
* fix: import path * Create popular-chairs-tie.md
1 parent aa06418 commit 9926a11

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.changeset/popular-chairs-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"astro-eslint-parser": patch
3+
---
4+
5+
fix: import path

src/parser/scope/index.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ import type {
1212
import type { VisitorKeys } from "@typescript-eslint/visitor-keys";
1313
import { traverseNodes } from "../../traverse";
1414
import { addElementsToSortedArray, addElementToSortedArray } from "../../util";
15-
import { ReferenceFlag } from "@typescript-eslint/scope-manager/dist/referencer/Reference";
15+
import type { ReferenceFlag } from "@typescript-eslint/scope-manager/dist/referencer/Reference";
16+
17+
const READ_FLAG = 1 as ReferenceFlag;
18+
const WRITE_FLAG = 2 as ReferenceFlag;
19+
const READ_WRITE_FLAG = 3 as ReferenceFlag;
20+
1621
/**
1722
* Gets the scope for the Program node
1823
*/
@@ -80,10 +85,10 @@ export function addVirtualReference(
8085
node,
8186
scope,
8287
readWrite.write && readWrite.read
83-
? ReferenceFlag.ReadWrite
88+
? READ_WRITE_FLAG
8489
: readWrite.write
85-
? ReferenceFlag.Write
86-
: ReferenceFlag.Read
90+
? WRITE_FLAG
91+
: READ_FLAG
8792
);
8893
(reference as any).astroVirtualReference = true;
8994

0 commit comments

Comments
 (0)