function shouldCheck(reference) {
			if (reference.init) {
				return false;
			}

			const { identifier } = reference;

			if (
				options.allowNamedExports &&
				identifier.parent.type === "ExportSpecifier" &&
				identifier.parent.local === identifier
			) {
				return false;
			}

			const variable = reference.resolved;

			if (!variable || variable.defs.length === 0) {
				return false;
			}

			const definitionType = variable.defs[0].type;

			if (!options.functions && definitionType === "FunctionName") {
				return false;
			}

			if (
				((!options.variables && definitionType === "Variable") ||
					(!options.classes && definitionType === "ClassName")) &&
				// don't skip checking the reference if it's in the same execution context, because of TDZ
				isFromSeparateExecutionContext(reference)
			) {
				return false;
			}

			if (!options.enums && definitionType === "TSEnumName") {
				return false;
			}

			if (!options.typedefs && definitionType === "Type") {
				return false;
			}

			if (
				options.ignoreTypeReferences &&
				(referenceContainsTypeQuery(identifier) ||
					identifier.parent.type === "TSTypeReference")
			) {
				return false;
			}

			// skip nested namespace aliases as variable references
			if (identifier.parent.type === "TSQualifiedName") {
				let currentNode = identifier.parent;

				while (currentNode.type === "TSQualifiedName") {
					currentNode = currentNode.left;
				}

				if (currentNode === identifier) {
					return true;
				}

				return false;
			}

			if (isClassRefInClassDecorator(variable, reference)) {
				return false;
			}

			return true;
		}
Determines whether a given reference should be checked.

Returns `false` if the reference is:
- initialization's (e.g., `let a = 1`).
- referring to an undefined variable (i.e., if it's an unresolved reference).
- referring to a variable that is defined, but not in the given source code
  (e.g., global environment variable or `arguments` in functions).
- allowed by options.
@param {eslint-scope.Reference} reference The reference
@returns {boolean} `true` if the reference should be checked