function getRightDirection(update, dir) {
			const staticValue = getStaticValue(
				update.right,
				sourceCode.getScope(update),
			);

			if (
				staticValue &&
				["bigint", "boolean", "number"].includes(
					typeof staticValue.value,
				)
			) {
				const sign = Math.sign(Number(staticValue.value)) || 0; // convert NaN to 0

				return dir * sign;
			}
			return 0;
		}
check the right side of the assignment
@param {ASTNode} update UpdateExpression to check
@param {number} dir expected direction that could either be turned around or invalidated
@returns {number} return dir, the negated dir, or zero if the counter does not change or the direction is not clear