From 3232278be5e66c08c5f86eb234a433310ef9437f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 5 May 2025 22:30:42 -0400 Subject: [PATCH 1/4] docs: add big announcement notice for old major versions --- docs/maintenance/Releases.mdx | 1 + packages/website/docusaurus.config.mts | 28 ++++++++++++++++++++++++++ packages/website/src/css/custom.css | 15 ++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/docs/maintenance/Releases.mdx b/docs/maintenance/Releases.mdx index 4e8eb84a4876..de80cb92315a 100644 --- a/docs/maintenance/Releases.mdx +++ b/docs/maintenance/Releases.mdx @@ -34,6 +34,7 @@ Per [Users > Releases > Major Releases](../users/Releases.mdx#major-releases), w - Its publish command should be `npx nx release publish --tag rc-v${major} --verbose`. - `README.md`: - Add a link to a `v${major}--typescript-eslint.netlify.app` preview deploy environment on Netlify that you create for the branch. + - `docusaurus.config.mts`: updating the `supportedMajorVersion` variable - Merge this into `main` once reviewed and rebase the `v${major}` branch. #### 1a. Shared Config Changes diff --git a/packages/website/docusaurus.config.mts b/packages/website/docusaurus.config.mts index 338a013d947e..2c48388f4973 100644 --- a/packages/website/docusaurus.config.mts +++ b/packages/website/docusaurus.config.mts @@ -18,6 +18,14 @@ const remarkPlugins: MDXPlugin[] = [[npm2yarnPlugin, { sync: true }]]; const githubUrl = 'https://github.com/typescript-eslint/typescript-eslint'; +const currentMajorVersion = + process.env.CURRENT_MAJOR_VERSION && + Number(process.env.CURRENT_MAJOR_VERSION); + +// Testing out temporarily for deploys. +// eslint-disable-next-line no-console +console.log(currentMajorVersion, 'from', process.env.CURRENT_MAJOR_VERSION); + const presetClassicOptions: PresetClassicOptions = { blog: { blogSidebarCount: 'ALL', @@ -60,6 +68,26 @@ const themeConfig: AlgoliaThemeConfig & ThemeCommonConfig = { appId: 'N1HUB2TU6A', indexName: 'typescript-eslint', }, + announcementBar: + currentMajorVersion && + Number(version[0].split('.')[0]) < currentMajorVersion + ? { + content: [ + 'This documentation is for an older major version of typescript-eslint.', + '
', + 'It is no longer maintained.', + '
', + 'Using the latest version of typescript-eslint is strongly recommended for', + 'getting the latest rule features and fixes, ', + 'supporting the latest TypeScript features and syntax, and', + 'continuous performance and stability improvements.', + '
', + 'Please visit typescript-eslint.io for the latest version\'s documentation.', + ].join('\n'), + id: 'old-version-announcement', + isCloseable: false, + } + : undefined, colorMode: { respectPrefersColorScheme: true, }, diff --git a/packages/website/src/css/custom.css b/packages/website/src/css/custom.css index 8c8ec55addf8..8e7f1f195d90 100644 --- a/packages/website/src/css/custom.css +++ b/packages/website/src/css/custom.css @@ -219,3 +219,18 @@ td > p:last-child { h5 { font-weight: bold; } + +/* stylelint-disable-next-line selector-id-pattern */ +#__docusaurus > div[role='banner'] { + font-size: 150%; + height: initial; + position: sticky; + padding: 1rem 1.5rem; + margin: auto; + max-width: max(60%, 70rem); +} + +/* stylelint-disable-next-line selector-id-pattern */ +#__docusaurus > div[role='banner'] a { + font-weight: bold; +} From f383bbb9387ecbbf9a47b4731b9d9d6a20943df0 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 5 May 2025 22:40:10 -0400 Subject: [PATCH 2/4] Update banner to be a bit more verbose about crashing --- packages/website/docusaurus.config.mts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/website/docusaurus.config.mts b/packages/website/docusaurus.config.mts index 2c48388f4973..3d66c81baa90 100644 --- a/packages/website/docusaurus.config.mts +++ b/packages/website/docusaurus.config.mts @@ -22,10 +22,6 @@ const currentMajorVersion = process.env.CURRENT_MAJOR_VERSION && Number(process.env.CURRENT_MAJOR_VERSION); -// Testing out temporarily for deploys. -// eslint-disable-next-line no-console -console.log(currentMajorVersion, 'from', process.env.CURRENT_MAJOR_VERSION); - const presetClassicOptions: PresetClassicOptions = { blog: { blogSidebarCount: 'ALL', @@ -75,7 +71,7 @@ const themeConfig: AlgoliaThemeConfig & ThemeCommonConfig = { content: [ 'This documentation is for an older major version of typescript-eslint.', '
', - 'It is no longer maintained.', + 'It is no longer maintained or supported. It may crash with the latest versions of TypeScript.', '
', 'Using the latest version of typescript-eslint is strongly recommended for', 'getting the latest rule features and fixes, ', From 731d21baadf885e0104b8b7e3454af6f67e44f84 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 5 May 2025 22:45:13 -0400 Subject: [PATCH 3/4] Also mention in Releases --- docs/users/Releases.mdx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/users/Releases.mdx b/docs/users/Releases.mdx index ad5625f70f33..81c6b504dddc 100644 --- a/docs/users/Releases.mdx +++ b/docs/users/Releases.mdx @@ -98,7 +98,23 @@ We assess need on a case-by-case basis though generally an emergency is defined These releases are done manually by a maintainer with the required access privileges. -## Back-Porting Releases +## Older Versions + +Older major versions of typescript-eslint are never maintained or supported. +They may crash with the latest versions of TypeScript. +Using the latest version of typescript-eslint is strongly recommended for getting the latest rule features and fixes, supporting the latest TypeScript features and syntax, and continuous performance and stability improvements. + +### Back-Porting Releases We **_do not_** back port releases to previously released major/minor versions. We only ever release forward. + +### Old Release Documentation + +You can find the last version of some older major versions under their dedicated branch deploys: + +- v7: [v7--typescript-eslint.netlify.app](https://v7--typescript-eslint.netlify.app) +- v6: [v6--typescript-eslint.netlify.app](https://v6--typescript-eslint.netlify.app) + +Note that older documentation pages may contain outdated information and links. +We strongly recommend using the latest version of typescript-eslint and its documentation. From 2e92aa3c7ee67c51e4a26c04b118ea68382c810a Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 12 May 2025 12:06:47 -0400 Subject: [PATCH 4/4] Also update release docs --- docs/maintenance/Releases.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/maintenance/Releases.mdx b/docs/maintenance/Releases.mdx index de80cb92315a..5473869cf388 100644 --- a/docs/maintenance/Releases.mdx +++ b/docs/maintenance/Releases.mdx @@ -78,6 +78,7 @@ These should only be done for feedback that consistently comes up in community t - It is important to note that when merged the commit message must also include `BREAKING CHANGE:` as the first line in order for `nx release` to recognize it as a breaking change in the release notes. If you miss this it just means more manual work when writing the release documentation. 1. Write and share out a blog post announcing the new beta [example: [Docs: Blog post describing changes & migration strategy for v5->v6](https://github.com/typescript-eslint/typescript-eslint/issues/6466)]. - Keep this post up-to-date as changes land in the `v${major}` branch. +1. Send a PR to the `v${major}` branch that adds the old major version to [Users > Releases > Old Release Documentation](../users/Releases.mdx#old-release-documentation) 1. Wait until all required PRs have been merged 1. Write a blog post announcing the new release [example: [Docs: Release blog post for v6](https://github.com/typescript-eslint/typescript-eslint/issues/7153)], and land it in the `v${major}` branch. 1. Let the release wait for **at least 1 week** to allow time for early adopters to help test it and discuss the changes. @@ -94,6 +95,9 @@ They don't need any special treatment. 1. Discuss with the maintainers to be ready for an [out-of-band](#out-of-band-releases) release. Doing this manually helps ensure someone is on-hand to action any issues that might arise from the major release. 1. Prepare the release notes. `nx release` will automatically generate the release notes on GitHub, however this will be disorganized and unhelpful for users. We need to reorganize the release notes so that breaking changes are placed at the top to make them most visible. If any migrations are required, we must list the steps to make it easy for users. - Example release notes: [`v6.0.0`](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v6.0.0), [`v5.0.0`](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v5.0.0) +1. Update Netlify deploys for old sites: + 1. Update the `CURRENT_MAJOR_VERSION` environment variable to the new major version integer, such as `9` + 2. Re-deploy the `v${major}` branches listed in [Users > Releases > Old Release Documentation](../users/Releases.mdx#old-release-documentation) 1. Finally, post the release on social media with a link to the GitHub release. Make sure you include additional information about the highlights of the release! ## Out-of-Band Releases