code: public static boolean isCommonJsExport(
        NodeTraversal t, Node export, ModuleLoader.ResolutionMode resolutionMode) {
      if (export.matchesQualifiedName(MODULE + "." + EXPORTS)
          || (export.isGetElem()
              && export.getFirstChild().matchesQualifiedName(MODULE)
              && export.getSecondChild().isString()
              && export.getSecondChild().getString().equals(EXPORTS))) {
        Var v = t.getScope().getVar(MODULE);
        if (v == null || v.isExtern()) {
          return true;
        }
      } else if (export.isName() && EXPORTS.equals(export.getString())) {
        Var v = t.getScope().getVar(export.getString());
        if (v == null || v.isGlobal()) {
          return true;
        }
      }
      return false;
    }
docs: Recognize if a node is a module export. We recognize several forms:
  
  <ul>
  <li>module.exports = something;
  <li>module.exports.something = something;
  <li>exports.something = something;
  </ul>
  
  <p>In addition, we only recognize an export if the base export object is not defined or is
  defined in externs.