Repository: eslint/eslint
File: tools/update-readme.js (JavaScript)

Code before:
    /* eslint-disable indent -- Allow deeper template substitution indent */
    return stripIndents`
        <table><tbody><tr>${members
            .map(
                (member, index) => `<td align="center" valign="top" width="11%">
            <a href="https://github.com/${member.username}">
                <img src="https://github.com/${
                    member.username
                }.png?s=75" width="75" height="75" alt="${member.name.trim()}'s Avatar"><br />
                ${member.name.trim()}
            </a>
            </td>${(index + 1) % 9 === 0 ? "</tr><tr>" : ""}`
            )
            .join("")}</tr></tbody></table>`;
    /* eslint-enable indent -- Allow deeper template substitution indent */
}

/**
 * Formats an array of sponsors into HTML for the readme.
 * @param {Array} sponsors The array of sponsors.
 * @returns {string} The HTML for the readme.
 */
function formatSponsors(sponsors) {
    const nonEmptySponsors = Object.keys(sponsors).filter(
        tier => sponsors[tier].length > 0
    );

    /* eslint-disable indent -- Allow deeper template substitution indent */
    return stripIndents`<!--sponsorsstart-->
        ${nonEmptySponsors
            .map(
                tier => `<h3>${tier[0].toUpperCase()}${tier.slice(
                    1
                )} Sponsors</h3>
            <p>${sponsors[tier]
                .map(
                    sponsor =>
                        `<a href="${sponsor.url || "#"}"><img src="${
                            sponsor.image
                        }" alt="${sponsor.name}" height="${heights[tier]}"></a>`
                )
                .join(" ")}</p>`
            )
            .join("")}
    <!--sponsorsend-->`;
    /* eslint-enable indent -- Allow deeper template substitution indent */
}

/**
 * Fetches the latest tech sponsors data from the website.
 * @returns {Array<Object>} The tech sponsors array of data object.

Review comment (suggestion):
```suggestion
    const nonEmptySponsors = Object.keys(sponsors).filter(
        tier => sponsors[tier].length);
```
no need to explicitly check if it is greater than 0.

Code after:
    /* eslint-disable indent -- Allow deeper template substitution indent */
    return stripIndents`
        <table><tbody><tr>${members
            .map(
                (member, index) => `<td align="center" valign="top" width="11%">
            <a href="https://github.com/${member.username}">
                <img src="https://github.com/${
                    member.username
                }.png?s=75" width="75" height="75" alt="${member.name.trim()}'s Avatar"><br />
                ${member.name.trim()}
            </a>
            </td>${(index + 1) % 9 === 0 ? "</tr><tr>" : ""}`
            )
            .join("")}</tr></tbody></table>`;
    /* eslint-enable indent -- Allow deeper template substitution indent */
}

/**
 * Formats an array of sponsors into HTML for the readme.
 * @param {Array} sponsors The array of sponsors.
 * @returns {string} The HTML for the readme.
 */
function formatSponsors(sponsors) {
    const nonEmptySponsors = Object.keys(sponsors).filter(
        tier => sponsors[tier].length
    );

    /* eslint-disable indent -- Allow deeper template substitution indent */
    return stripIndents`<!--sponsorsstart-->
        ${nonEmptySponsors
            .map(
                tier => `<h3>${tier[0].toUpperCase()}${tier.slice(
                    1
                )} Sponsors</h3>
            <p>${sponsors[tier]
                .map(
                    sponsor =>
                        `<a href="${sponsor.url || "#"}"><img src="${
                            sponsor.image
                        }" alt="${sponsor.name}" height="${heights[tier]}"></a>`
                )
                .join(" ")}</p>`
            )
            .join("")}
    <!--sponsorsend-->`;
    /* eslint-enable indent -- Allow deeper template substitution indent */
}

/**
 * Fetches the latest tech sponsors data from the website.
 * @returns {Array<Object>} The tech sponsors array of data object.