function ensureWasAssigned(node) {
			const scope = sourceCode.getScope(node);

			// if this is program scope we also need to check module scope
			const extraScope =
				node.type === "Program" && node.sourceType === "module"
					? scope.childScopes[0]
					: null;

			aliases.forEach(alias => {
				checkWasAssigned(alias, scope);

				if (extraScope) {
					checkWasAssigned(alias, extraScope);
				}
			});
		}
Check each alias to ensure that is was assigned to the correct value.
@param {ASTNode} node The node that represents the scope to check.
@returns {void}