lib/rules/no-unsupported-features.js
function hasTrailingCommaForFunction(node) {
            const length = node.params.length

            return (
                length >= 1 &&
                sourceCode.getTokenAfter(node.params[length - 1]).value === ","
            )
        }
function hasTrailingCommaForFunction(node) {
            const length = node.params.length

            return (
                length >= 1 &&
                sourceCode.getTokenAfter(node.params[length - 1]).value === ","
            )
        }
Checks whether the given function has trailing commas or not.

@param {ASTNode} node - The function node to check.
@returns {boolean} `true` if the function has trailing commas.