function isArgumentOfWellKnownMutationFunction(node, scope) {
	const { parent } = node;

	if (parent.type !== "CallExpression" || parent.arguments[0] !== node) {
		return false;
	}
	const callee = astUtils.skipChainExpression(parent.callee);

	if (
		!astUtils.isSpecificMemberAccess(
			callee,
			"Object",
			WellKnownMutationFunctions.Object,
		) &&
		!astUtils.isSpecificMemberAccess(
			callee,
			"Reflect",
			WellKnownMutationFunctions.Reflect,
		)
	) {
		return false;
	}
	const variable = findVariable(scope, callee.object);

	return variable !== null && variable.scope.type === "global";
}
Check if a given node is at the first argument of a well-known mutation function.
- `Object.assign`
- `Object.defineProperty`
- `Object.defineProperties`
- `Object.freeze`
- `Object.setPrototypeOf`
- `Reflect.defineProperty`
- `Reflect.deleteProperty`
- `Reflect.set`
- `Reflect.setPrototypeOf`
@param {ASTNode} node The node to check.
@param {Scope} scope A `escope.Scope` object to find variable (whichever).
@returns {boolean} `true` if the node is at the first argument of a well-known mutation function.