code: function isObjectOrClassMethod(node) {
              const parent = node.parent;
  
              return (parent.type === "MethodDefinition" || (
                  parent.type === "Property" && (
                      parent.method ||
                      parent.kind === "get" ||
                      parent.kind === "set"
                  )
              ));
          }
docs: Determines whether the current FunctionExpression node is a get, set, or
  shorthand method in an object literal or a class.
  @param {ASTNode} node - A node to check.
  @returns {boolean} True if the node is a get, set, or shorthand method.