function checkReference(reference, index, references) {
			const identifier = reference.identifier;

			if (
				reference.init === false &&
				reference.isWrite() &&
				/*
				 * Destructuring assignments can have multiple default value,
				 * so possibly there are multiple writeable references for the same identifier.
				 */
				(index === 0 || references[index - 1].identifier !== identifier)
			) {
				context.report({
					node: identifier,
					messageId: "globalShouldNotBeModified",
					data: {
						name: identifier.name,
					},
				});
			}
		}
Reports write references.
@param {Reference} reference A reference to check.
@param {number} index The index of the reference in the references.
@param {Reference[]} references The array that the reference belongs to.
@returns {void}