bin/pretty.js
function filterFiles(files, validExtensions) {
    const accepted = [];

    for (const fileName of files) {
        if (accepted.indexOf(fileName) === -1 && fileMatchesExtension(fileName, validExtensions)) {
            accepted.push(fileName);
        }
    }

    return accepted;
}
function filterFiles(files, validExtensions) {
    const accepted = [];

    for (const fileName of files) {
        if (accepted.indexOf(fileName) === -1 && fileMatchesExtension(fileName, validExtensions)) {
            accepted.push(fileName);
        }
    }

    return accepted;
}
function filterFiles ( files , validExtensions ) { const accepted = [ ] ; for ( const fileName of files ) { if ( accepted . indexOf ( fileName ) === - 1 && fileMatchesExtension ( fileName , validExtensions ) ) { accepted . push ( fileName ) ; } } return accepted ; }
Make sure we only use valid extensions, and each fileName appears only once
Make sure we only use valid extensions and each fileName appears only once