function isSetter(node, sourceCode) {
	const parent = node.parent;

	if (
		(parent.type === "Property" || parent.type === "MethodDefinition") &&
		parent.kind === "set" &&
		parent.value === node
	) {
		// Setter in an object literal or in a class
		return true;
	}

	if (
		parent.type === "Property" &&
		parent.value === node &&
		astUtils.getStaticPropertyName(parent) === "set" &&
		parent.parent.type === "ObjectExpression" &&
		isPropertyDescriptor(parent.parent, sourceCode)
	) {
		// Setter in a property descriptor
		return true;
	}

	return false;
}
Determines whether the given function node is used as a setter function.
@param {ASTNode} node The node to check.
@param {SourceCode} sourceCode Source code to which the node belongs.
@returns {boolean} `true` if the node is a setter.