code: function isWriteReference(reference) {
      if (reference.init) {
          const def = reference.resolved && reference.resolved.defs[0];
  
          if (!def || def.type !== "Variable" || def.parent.kind !== "var") {
              return false;
          }
      }
      return reference.isWrite();
  }
docs: @typedef {Object} LoopConditionInfo
  @property {eslint-scope.Reference} reference - The reference.
  @property {ASTNode} group - BinaryExpression or ConditionalExpression nodes
  that the reference is belonging to.
  @property {Function} isInLoop - The predicate which checks a given reference
  is in this loop.
  @property {boolean} modified - The flag that the reference is modified in
  this loop.
   
  Checks whether or not a given reference is a write reference.
  
  @param {eslint-scope.Reference} reference - A reference to check.
  @returns {boolean} `true` if the reference is a write reference.