Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: un-ts/eslint-plugin-import-x
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 72ebca52b06bd5c3567e19a58c5f8ad64512670e
Choose a base ref
..
head repository: un-ts/eslint-plugin-import-x
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bd781ac7f7d62b774196101cc1edf289b53e9e5c
Choose a head ref
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/utils/declared-scope.ts
3 changes: 2 additions & 1 deletion src/utils/declared-scope.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { TSESTree } from '@typescript-eslint/utils'
import type { ScopeType } from '@typescript-eslint/scope-manager';

import type { RuleContext } from '../types'

export function declaredScope(
context: RuleContext,
node: TSESTree.Node,
name: string,
) {
): ScopeType | undefined {
const references = context.sourceCode.getScope(node).references
const reference = references.find(x => x.identifier.name === name)
if (!reference || !reference.resolved) {