lib/rules/no-useless-constructor.js
function checkForConstructor(node) {
            if (node.kind !== "constructor") {
                return;
            }

            const body = node.value.body.body;
            const ctorParams = node.value.params;
            const superClass = node.parent.parent.superClass;

            if (superClass ? isRedundantSuperCall(body, ctorParams) : (body.length === 0)) {
                context.report({
                    node,
                    message: "Useless constructor."
                });
            }
        }
function checkForConstructor(node) {
            if (node.kind !== "constructor") {
                return;
            }

            const body = node.value.body.body;
            const ctorParams = node.value.params;
            const superClass = node.parent.parent.superClass;

            if (superClass ? isRedundantSuperCall(body, ctorParams) : (body.length === 0)) {
                context.report({
                    node,
                    message: "Useless constructor."
                });
            }
        }
function checkForConstructor ( node ) { if ( node . kind !== "constructor" ) { return ; } const body = node . value . body . body ; const ctorParams = node . value . params ; const superClass = node . parent . parent . superClass ; if ( superClass ? isRedundantSuperCall ( body , ctorParams ) : ( body . length === 0 ) ) { context . report ( { node , message : "Useless constructor." } ) ; } }
Checks whether a node is a redundant constructor
@param {ASTNode} node - node to check
@returns {void}
Checks whether a node is a redundant constructor