Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Use prerendered sponsors for README #122

Merged
merged 2 commits into from
Oct 18, 2024
Merged

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request?

Simplifies script that adds sponsors to READMEs.

What changes did you make? (Give an overview)

Updated tools/update-readme.js to use prerendered sponsors markdown from the eslint.org repo.

Related Issues

eslint/eslint.org#619

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the documentation Improvements or additions to documentation label Oct 5, 2024
newReadme = newReadme.replace(
/<!--techsponsorsstart-->[\w\W]*?<!--techsponsorsend-->/u,
formatTechSponsors(techSponsors),
`<!--sponsorsstart-->\n\n${allSponsors}\n<!--sponsorsend-->`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have two new line in this repo alone? whilst we dont have it in other eslint/js and eslint/eslint repo?

Copy link
Member Author

@mdjermanovic mdjermanovic Oct 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the second one, in this repo Prettier would be reporting a formatting error there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added another new line in the fetched content, for the same reason (eslint/eslint.org#648).

</p>
<!--techsponsorsend-->`;
async function fetchSponsorsMarkdown() {
return got(SPONSORS_URL).text();
}

//-----------------------------------------------------------------------------
// Main
//-----------------------------------------------------------------------------

(async () => {
Copy link
Member

@amareshsm amareshsm Oct 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(async () => {

remove IIFE fn

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in 0911a8f now.

Copy link
Member

@amareshsm amareshsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@nzakas nzakas merged commit 0008606 into main Oct 18, 2024
14 checks passed
@nzakas nzakas deleted the prerendered-sponsors branch October 18, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted documentation Improvements or additions to documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

5 participants