function reportError(node, initial, type) {
			const name =
				initial.type === "Identifier" ? initial.name : initial.value;

			return context.report({
				node,
				messageId: "unnecessarilyRenamed",
				data: {
					name,
					type,
				},
				fix(fixer) {
					const replacementNode =
						node.type === "Property" ? node.value : node.local;

					if (
						sourceCode.getCommentsInside(node).length >
						sourceCode.getCommentsInside(replacementNode).length
					) {
						return null;
					}

					// Don't autofix code such as `({foo: (foo) = a} = obj);`, parens are not allowed in shorthand properties.
					if (
						replacementNode.type === "AssignmentPattern" &&
						astUtils.isParenthesised(
							sourceCode,
							replacementNode.left,
						)
					) {
						return null;
					}

					return fixer.replaceText(
						node,
						sourceCode.getText(replacementNode),
					);
				},
			});
		}
Reports error for unnecessarily renamed assignments
@param {ASTNode} node node to report
@param {ASTNode} initial node with initial name value
@param {string} type the type of the offending node
@returns {void}