File tree 1 file changed +1
-17
lines changed
1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -107,23 +107,7 @@ function isReactiveVariableNode(
107
107
node : TSESTree . Node ,
108
108
) : node is TSESTree . Identifier {
109
109
if ( node . type !== "Identifier" ) return false
110
- if ( ! isVariableNode ( node ) || isFunctionCall ( node ) ) return false
111
-
112
- // Variable name starts with `$` means Svelte store.
113
- if ( node . name . startsWith ( "$" ) ) return true
114
- const scope = getScope ( context , node )
115
- return scope . references . some ( ( reference ) => {
116
- const { resolved } = reference
117
- if ( ! resolved || resolved . name !== node . name ) return false
118
-
119
- return resolved . defs . some ( ( def ) => {
120
- return (
121
- ( def as any ) . parent ?. parent ?. type === "SvelteScriptElement" &&
122
- def . name . type === "Identifier" &&
123
- def . name . name === node . name
124
- )
125
- } )
126
- } )
110
+ return getAllReactiveVariableReferences ( context ) . includes ( node )
127
111
}
128
112
129
113
/**
You can’t perform that action at this time.
0 commit comments