Skip to content

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Feb 21, 2024

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Ensured that the version number is displayed instead of NEXT in the dropdown on the docs site. This is accomplished by either reading the version locally (on the next branch) or fetching the version from GitHub.

fixes #17943

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

I'm pulling the package.json from the next branch, but wasn't sure if it should be main. I don't think it matters much but seemed better to use next to properly indicate the intent.

Note: We'll need to make the same change in the v8.x branch.

versiondropdown

@nzakas nzakas requested a review from a team as a code owner February 21, 2024 20:09
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Feb 21, 2024
Copy link

netlify bot commented Feb 21, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit ff876e4
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/65d7928c51dbd6000840f768
😎 Deploy Preview https://deploy-preview-18135--docs-eslint.netlify.app/versions
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdjermanovic mdjermanovic added the accepted There is consensus among the team that this change meets the criteria for inclusion label Feb 22, 2024
@mdjermanovic
Copy link
Member

This should be updated, too:

<li><a href="/docs/next/" {% if GIT_BRANCH == "next" %} data-current="true" {% endif %}>NEXT</a></li>

Copy link
Member

@mdjermanovic mdjermanovic 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!

@mdjermanovic mdjermanovic merged commit 7db5bb2 into main Feb 22, 2024
@mdjermanovic mdjermanovic deleted the issue17943 branch February 22, 2024 19:44
nzakas added a commit that referenced this pull request Feb 22, 2024
* docs: Show prerelease version in dropdown

fixes #17943

* Update docs/src/_data/eslintNextVersion.js

Co-authored-by: Milos Djermanovic <[email protected]>

* Update docs/src/_includes/components/nav-version-switcher.html

Co-authored-by: Milos Djermanovic <[email protected]>

* Update versions-list.html

---------

Co-authored-by: Milos Djermanovic <[email protected]>
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Aug 21, 2024
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Docs: Show v9.0.0-alpha.0 in dropdown instead of NEXT

2 participants