lib/rules/keyword-spacing.js
function checkSpacingForProperty(node) {
            if (node.static) {
                checkSpacingAroundFirstToken(node);
            }
            if (node.kind === "get" ||
                node.kind === "set" ||
                (
                    (node.method || node.type === "MethodDefinition") &&
                    node.value.async
                )
            ) {
                const token = sourceCode.getTokenBefore(
                    node.key,
                    tok => {
                        switch (tok.value) {
                            case "get":
                            case "set":
                            case "async":
                                return true;
                            default:
                                return false;
                        }
                    }
                );

                if (!token) {
                    throw new Error("Failed to find token get, set, or async beside method name");
                }


                checkSpacingAround(token);
            }
        }
function checkSpacingForProperty(node) {
            if (node.static) {
                checkSpacingAroundFirstToken(node);
            }
            if (node.kind === "get" ||
                node.kind === "set" ||
                (
                    (node.method || node.type === "MethodDefinition") &&
                    node.value.async
                )
            ) {
                const token = sourceCode.getTokenBefore(
                    node.key,
                    tok => {
                        switch (tok.value) {
                            case "get":
                            case "set":
                            case "async":
                                return true;
                            default:
                                return false;
                        }
                    }
                );

                if (!token) {
                    throw new Error("Failed to find token get, set, or async beside method name");
                }


                checkSpacingAround(token);
            }
        }
function checkSpacingForProperty ( node ) { if ( node . static ) { checkSpacingAroundFirstToken ( node ) ; } if ( node . kind === "get" || node . kind === "set" || ( ( node . method || node . type === "MethodDefinition" ) && node . value . async ) ) { const token = sourceCode . getTokenBefore ( node . key , tok => { switch ( tok . value ) { case "get" : case "set" : case "async" : return true ; default : return false ; } } ) ; if ( ! token ) { throw new Error ( "Failed to find token get, set, or async beside method name" ) ; } checkSpacingAround ( token ) ; } }
Reports `static`, `get`, and `set` keywords of a given node if usage of
spacing around those keywords is invalid.

@param {ASTNode} node - A node to report.
@returns {void}
Reports static get and set keywords of a given node if usage of spacing around those keywords is invalid .