code: function checkFunction(node) {
              if (!node.generator) {
                  return;
              }
  
              const starToken = getStarToken(node);
              const prevToken = sourceCode.getTokenBefore(starToken);
              const nextToken = sourceCode.getTokenAfter(starToken);
  
              let kind = "named";
  
              if (node.parent.type === "MethodDefinition" || (node.parent.type === "Property" && node.parent.method)) {
                  kind = "method";
              } else if (!node.id) {
                  kind = "anonymous";
              }
  
              // Only check before when preceded by `function`|`static` keyword
              if (!(kind === "method" && starToken === sourceCode.getFirstToken(node.parent))) {
                  checkSpacing(kind, "before", prevToken, starToken);
              }
  
              checkSpacing(kind, "after", starToken, nextToken);
          }
docs: Enforces the spacing around the star if node is a generator function.
  
  @param {ASTNode} node A function expression or declaration node.
  @returns {void}