Skip to content

Commit b0ad83c

Browse files
committed
fix: use getScope util
1 parent 8405587 commit b0ad83c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/eslint-plugin-svelte/src/rules/derived-has-same-inputs-outputs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import type { Variable } from '@typescript-eslint/scope-manager';
33
import { createRule } from '../utils/index.js';
44
import type { RuleContext } from '../types.js';
55
import { extractStoreReferences } from './reference-helpers/svelte-store.js';
6-
import { getSourceCode } from '../utils/compat.js';
6+
import { getScope } from '../utils/ast-utils.js';
77

88
function findVariableForName(
99
context: RuleContext,
1010
node: TSESTree.Node,
1111
name: string,
1212
expectedName: string
1313
): { hasConflict: boolean; variable: Variable | null } {
14-
const scope = getSourceCode(context).getScope(node);
14+
const scope = getScope(context, node);
1515
let hasConflict = false;
1616
let variable: Variable | null = null;
1717

packages/eslint-plugin-svelte/src/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,4 @@ export interface SourceCode {
366366
getCommentsAfter(nodeOrToken: NodeOrToken | AST.Token): AST.Comment[];
367367

368368
getCommentsInside(node: NodeOrToken): AST.Comment[];
369-
370-
getScope(node: NodeOrToken): Scope;
371369
}

0 commit comments

Comments
 (0)