Why is this an issue?

Empty functions can be a sign of poor code quality and can make the code harder to read and maintain. It usually happens when a developer forgets to add any statements to it, or when a function is no longer needed but is not removed from the codebase. In these cases when it is an unintentional omission, it should be fixed to prevent an unexpected behavior in production.

function foo() { //Noncompliant: Function does not have any statement
}

Ensure that all functions contain meaningful statements. Otherwise, they should be removed.

function foo() {
    do_something();
}

Throw an exception if it is done intentionally due to some functionality not being supported yet.

function foo() {
    throw new Error("Not yet implemented");
}

Exceptions

function foo() {
    // This is intentional
}
static defaultProps = {
  listStyle: () => {}
};
function onClick() {
}

Resources

Documentation