From 2645fdf456c49afae4bf56c91a5140d3c46c2b54 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 23 Oct 2026 18:15:03 +0200 Subject: [PATCH 1/6] chore: remove tooling config entries for paths that no longer exist (AI-assisted) - jest/vendor (cspell, stylelint, oxfmt): removed with the Vitest migration, #12010 - packages/create-docusaurus/templates/facebook (ESLint): removed in #9026 - website/docusaurus.config.js (oxfmt): the config is TypeScript since #9317 - packages/docusaurus-migrate/lib (Vitest): package removed in #9400 - website/netlifyDeployPreview (.gitignore): removed in #4447 - .cache-loader (.gitignore): cache-loader removed with Webpack 5, #4089 - commented-out website/i18n/fr negations (.gitignore) - ".svg" (oxfmt): typo for the "*.svg" pattern right below it Co-Authored-By: Claude Opus 5.5 --- .cspell.json | 3 +-- .gitignore | 6 ------ .oxfmtrc.json | 3 --- .stylelintignore | 2 -- eslint.config.ts | 1 - vitest.config.ts | 1 - 6 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.cspell.json b/.cspell.json index 0e291bbd140c..4a07f0cb6256 100644 --- a/.cspell.json +++ b/.cspell.json @@ -50,8 +50,7 @@ "*.xslt", "*.gitignore", "versioned_docs", - "*.min.*", - "jest/vendor" + "*.min.*" ], "ignoreRegExpList": ["Email", "Urls", "#[\\w-]*", "\\u\\{[0-9A-F]{4}\\}"] } diff --git a/.gitignore b/.gitignore index 89a2c671fac8..b5e10317b363 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ yarn-error.log website/build coverage .docusaurus -.cache-loader types test-website test-website-in-workspace @@ -30,10 +29,7 @@ packages/docusaurus-*/lib/* packages/eslint-plugin/lib/ packages/stylelint-copyright/lib/ -website/netlifyDeployPreview/* website/changelog -!website/netlifyDeployPreview/index.html -!website/netlifyDeployPreview/_redirects website/_dogfooding/_swizzle_theme_tests @@ -42,8 +38,6 @@ CrowdinTranslations_*.zip website/.cpu-prof website/i18n/**/* -#!website/i18n/fr -#!website/i18n/fr/**/* .netlify diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 6a38f7dfffa7..d27e3907d2d4 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -13,9 +13,7 @@ "coverage", ".docusaurus", ".idea", - ".svg", "*.svg", - "jest/vendor", "argos/test-results", "packages/lqip-loader/lib/", "packages/docusaurus/lib/", @@ -32,7 +30,6 @@ "__fixtures__", "website/i18n", "website/versions.json", - "website/docusaurus.config.js", "website/versioned_docs/", "website/versioned_sidebars/*.json", "examples/", diff --git a/.stylelintignore b/.stylelintignore index 7bed557f3674..0415891b259c 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -16,5 +16,3 @@ packages/create-docusaurus/lib/* packages/create-docusaurus/templates/ website/static/katex/katex.min.css website/_dogfooding/_asset-tests/badSyntax.css - -jest/vendor diff --git a/eslint.config.ts b/eslint.config.ts index 43b962b27b76..501eb3e7127a 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -75,7 +75,6 @@ const ignores = globalIgnores([ 'packages/eslint-plugin/lib/', 'packages/stylelint-copyright/lib/', 'packages/create-docusaurus/lib/*', - 'packages/create-docusaurus/templates/facebook', 'website/i18n', 'website/_dogfooding/_swizzle_theme_tests', 'website/_dogfooding/_asset-tests/badSyntax.js', diff --git a/vitest.config.ts b/vitest.config.ts index 888fc6a76a7b..c8a03cfcf12b 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -34,7 +34,6 @@ const ignorePatterns = [ '**/packages/docusaurus-plugin-content-pages/lib/**', '**/packages/docusaurus-theme-classic/lib/**', '**/packages/docusaurus-theme-common/lib/**', - '**/packages/docusaurus-migrate/lib/**', '**/test/**', '**/argos/**', ]; From 99a8865fe34a3515d3f9aa5b1da10847f09cab36 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 23 Oct 2026 18:17:19 +0200 Subject: [PATCH 2/6] chore(knip): treat configuration hints as errors, ignore the ideal-image fork internals (AI-assisted) - Add treatConfigHintsAsErrors, and remove the 3 entries Knip reports as useless: the playwright binary, and the @docusaurus/plugin-css-cascade-layers and @mdx-js/react dependencies - Don't treat the react-ideal-image fork modules as theme component entries, so that Knip reports the unused ones Co-Authored-By: Claude Opus 5.5 --- knip.config.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/knip.config.ts b/knip.config.ts index 3af15e860e8a..9a6e3bdeca0c 100644 --- a/knip.config.ts +++ b/knip.config.ts @@ -59,6 +59,8 @@ const config: KnipConfig = ({ // Production mode reports the exports only used by tests, except the ones // also used in their own file: they are often exported to be tested ignoreExportsUsedInFile: production, + // Fail on useless configuration entries + treatConfigHintsAsErrors: true, ignore: ['**/__fixtures__/**'], ignoreDependencies: [ // Docusaurus client API aliases, see packages/docusaurus/src/client/exports @@ -96,8 +98,6 @@ const config: KnipConfig = ({ // False positives, not binaries 'create', 'typecheck', - // Installed in the argos workspace - 'playwright', ], }, 'admin/new.docusaurus.io': { @@ -148,17 +148,18 @@ const config: KnipConfig = ({ 'packages/docusaurus-plugin-google-gtag': { entry: ['src/gtag.ts!', 'src/vendor-gtag.ts!'], }, - 'packages/docusaurus-plugin-ideal-image': themePackageConfig(), + 'packages/docusaurus-plugin-ideal-image': themePackageConfig({ + entry: [ + // Internal modules of the react-ideal-image fork, not theme components + '!src/theme/IdealImageLegacy/components/**', + ], + }), 'packages/docusaurus-plugin-pwa': themePackageConfig({ entry: ['src/registerSw.ts!', 'src/sw.ts!'], }), 'packages/docusaurus-plugin-vercel-analytics': { entry: ['src/analytics.ts!'], }, - 'packages/docusaurus-preset-classic': { - // Resolved with require.resolve(name) - ignoreDependencies: ['@docusaurus/plugin-css-cascade-layers'], - }, 'packages/docusaurus-theme-classic': themePackageConfig({ entry: ['src/nprogress.ts!', 'src/prism-include-languages.ts!'], ignoreDependencies: [ @@ -211,7 +212,6 @@ const config: KnipConfig = ({ 'netlify-plugin-cache', // Used by theme components ejected in CI, see testSwizzleThemeClassic.mjs '@docusaurus/utils-common', - '@mdx-js/react', '@types/prismjs', 'copy-text-to-clipboard', 'prismjs', From 7180bd75e9e5af28af61279ca8626ba3c53fb56b Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 23 Oct 2026 18:17:50 +0200 Subject: [PATCH 3/6] test: remove unused test fixtures (AI-assisted) - docs bad-id-site and bad-slug-on-doc-home-site: unused since #3245 - utils vcs simple-site: unused since #11512 Co-Authored-By: Claude Opus 5.5 --- .../__tests__/__fixtures__/bad-id-site/docs/invalid-id.md | 5 ----- .../bad-slug-on-doc-home-site/docs/docWithSlug.md | 5 ----- .../src/vcs/__tests__/__fixtures__/simple-site/README.md | 1 - .../__tests__/__fixtures__/simple-site/blog/2025/blog2.md | 1 - .../src/vcs/__tests__/__fixtures__/simple-site/blog/blog1.md | 1 - .../__fixtures__/simple-site/docs/_partials/somePartial.md | 3 --- .../__fixtures__/simple-site/docs/doc with space.md | 1 - .../src/vcs/__tests__/__fixtures__/simple-site/docs/doc1.md | 1 - .../src/vcs/__tests__/__fixtures__/simple-site/docs/doc2.md | 1 - 9 files changed, 19 deletions(-) delete mode 100644 packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-id-site/docs/invalid-id.md delete mode 100644 packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-slug-on-doc-home-site/docs/docWithSlug.md delete mode 100644 packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/README.md delete mode 100644 packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/2025/blog2.md delete mode 100644 packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/blog1.md delete mode 100644 packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/_partials/somePartial.md delete mode 100644 packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc with space.md delete mode 100644 packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc1.md delete mode 100644 packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc2.md diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-id-site/docs/invalid-id.md b/packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-id-site/docs/invalid-id.md deleted file mode 100644 index 1ffe4fa38eac..000000000000 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-id-site/docs/invalid-id.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -id: hello/super ---- - -Lorem diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-slug-on-doc-home-site/docs/docWithSlug.md b/packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-slug-on-doc-home-site/docs/docWithSlug.md deleted file mode 100644 index a3fa2f34fc9a..000000000000 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/__fixtures__/bad-slug-on-doc-home-site/docs/docWithSlug.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -slug: docWithSlug.html ---- - -Lorem diff --git a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/README.md b/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/README.md deleted file mode 100644 index f7bbbdc9d6d3..000000000000 --- a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/README.md +++ /dev/null @@ -1 +0,0 @@ -A site fixture with files versioned on Git. \ No newline at end of file diff --git a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/2025/blog2.md b/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/2025/blog2.md deleted file mode 100644 index 957ede511ee2..000000000000 --- a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/2025/blog2.md +++ /dev/null @@ -1 +0,0 @@ -Blog 2 \ No newline at end of file diff --git a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/blog1.md b/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/blog1.md deleted file mode 100644 index 3fc60acc3082..000000000000 --- a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/blog/blog1.md +++ /dev/null @@ -1 +0,0 @@ -Blog 1 \ No newline at end of file diff --git a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/_partials/somePartial.md b/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/_partials/somePartial.md deleted file mode 100644 index 9f236098e703..000000000000 --- a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/_partials/somePartial.md +++ /dev/null @@ -1,3 +0,0 @@ -This is a partial in file/folder starting with _: - -It should be excluded by default diff --git a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc with space.md b/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc with space.md deleted file mode 100644 index 7d0ae59310cf..000000000000 --- a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc with space.md +++ /dev/null @@ -1 +0,0 @@ -Doc with space in name \ No newline at end of file diff --git a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc1.md b/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc1.md deleted file mode 100644 index 81289a604bbd..000000000000 --- a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc1.md +++ /dev/null @@ -1 +0,0 @@ -Doc 1 \ No newline at end of file diff --git a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc2.md b/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc2.md deleted file mode 100644 index 40675cc0928a..000000000000 --- a/packages/docusaurus-utils/src/vcs/__tests__/__fixtures__/simple-site/docs/doc2.md +++ /dev/null @@ -1 +0,0 @@ -Doc 2 \ No newline at end of file From 07f4d27cc2d7400373cd7ba9a5fe60497ba7a40b Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 23 Oct 2026 18:18:06 +0200 Subject: [PATCH 4/6] test(website): fix the React-DOM version check of the bad package dogfood test (AI-assisted) The second check tested ReactVersion again, so a bad React-DOM version never threw. Introduced in #10391. Co-Authored-By: Claude Opus 5.5 --- admin/test-bad-package/README.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/test-bad-package/README.mdx b/admin/test-bad-package/README.mdx index 260522db2417..0deb2916423b 100644 --- a/admin/test-bad-package/README.mdx +++ b/admin/test-bad-package/README.mdx @@ -18,7 +18,7 @@ export function TestComponent() { `'test-bad-package/README.mdx' is rendered with bad React version: ${ReactVersion}`, ); } - if (!ReactVersion.startsWith(`${expectedVersion}`)) { + if (!ReactDOMVersion.startsWith(`${expectedVersion}`)) { throw new Error( `'test-bad-package/README.mdx' is rendered with bad React-DOM version: ${ReactDOMVersion}`, ); From 863b4f550f10eda6b5d87c49fe2b8f7e4251369d Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 23 Oct 2026 18:24:46 +0200 Subject: [PATCH 5/6] chore: remove more stale config entries (AI-assisted) - .gitignore types: nothing generates a types dir, even in #1490 where it was added, and it ignores any new types/ source folder - .gitignore website/rspack-tracing.json: the Rspack trace is written to rspack-tracing.pftrace since #11290 - clear script --ignore docusaurus: protected the lib/ sources of the v1 "docusaurus" package, removed in #4902 - ESLint __mocks__ ignore: converted from .eslintignore in #12024, it only matches a root __mocks__ dir that doesn't exist - Syncpack type-alias group: only the exact @types/react version still needs it, the * ranges are gone since #12435 and the other dependencies use the catalog since #12696 Co-Authored-By: Claude Opus 5.5 --- .gitignore | 2 -- .syncpackrc.ts | 10 ++-------- eslint.config.ts | 1 - package.json | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index b5e10317b363..1808f4a36ce7 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ yarn-error.log website/build coverage .docusaurus -types test-website test-website-in-workspace @@ -41,7 +40,6 @@ website/i18n/**/* .netlify -website/rspack-tracing.json website/rspack-tracing.pftrace website/bundler-cpu-profile.json website/profile.json.gz diff --git a/.syncpackrc.ts b/.syncpackrc.ts index ca8d329dfb82..623e64b6b87b 100644 --- a/.syncpackrc.ts +++ b/.syncpackrc.ts @@ -44,19 +44,13 @@ export default { }, { - label: 'Ignore * deps in type-alias packages', + label: 'Ignore the exact @types/react version in type-alias packages', packages: [ '@docusaurus/module-type-aliases', '@docusaurus/theme-common', '@docusaurus/types', ], - dependencies: [ - 'react', - 'react-dom', - '@types/react', - '@types/react-router-config', - '@types/react-router-dom', - ], + dependencies: ['@types/react'], isIgnored: true, }, diff --git a/eslint.config.ts b/eslint.config.ts index 501eb3e7127a..33c54a7fb4ea 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -63,7 +63,6 @@ const ignores = globalIgnores([ 'test-website*/build', '**/.docusaurus/**', '**/__fixtures__/**', - '__mocks__', 'node_modules', '.yarn', '.history', diff --git a/package.json b/package.json index 8920d6a57d29..115b0bacbe90 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "typecheck:tests": "tsc -p tsconfig.tests.json", "test:build:website": "./admin/scripts/test-release.sh", "watch": "pnpm lerna run --parallel watch", - "clear": "(pnpm --filter website clear || echo 'Failure while running docusaurus clear') && pnpm rimraf test-website && pnpm rimraf test-website-in-workspace && pnpm lerna exec --ignore docusaurus pnpm rimraf lib", + "clear": "(pnpm --filter website clear || echo 'Failure while running docusaurus clear') && pnpm rimraf test-website && pnpm rimraf test-website-in-workspace && pnpm lerna exec pnpm rimraf lib", "test:baseUrl": "pnpm build:website:baseUrl && pnpm serve:website:baseUrl", "lock:update": "pnpm install --lockfile-only", "update-translations": "pnpm --filter @docusaurus/theme-translations run update" From 1126b25b19313d458341a4ec08740eef6a0e1e1d Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 23 Oct 2026 18:25:31 +0200 Subject: [PATCH 6/6] chore: replace the Prettier and Jest leftovers (AI-assisted) The monorepo formats with oxfmt since #11824 and tests with Vitest since #12010 - Devcontainer: format with the Oxc extension instead of Prettier, which formatted with its defaults, and remove the Jest extension - README: remove the Prettier and Jest badges - CONTRIBUTING: the formatter is oxfmt Co-Authored-By: Claude Opus 5.5 --- .devcontainer/devcontainer.json | 11 +++++------ CONTRIBUTING.md | 2 +- README.md | 2 -- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 610d2e31e6b9..01659f565fa6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,22 +4,21 @@ "vscode": { "settings": { "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "oxc.oxc-vscode", "editor.formatOnSave": true }, "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "oxc.oxc-vscode", "editor.formatOnSave": true }, "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "oxc.oxc-vscode", "editor.formatOnSave": true } }, "extensions": [ "dbaeumer.vscode-eslint", - "orta.vscode-jest", - "esbenp.prettier-vscode", + "oxc.oxc-vscode", "streetsidesoftware.code-spell-checker" ] } @@ -30,7 +29,7 @@ "COREPACK_ENABLE_DOWNLOAD_PROMPT": "0" // Avoid waiting for a prompt in the postCreateCommand }, "postCreateCommand": "pnpm install", - "waitFor": "postCreateCommand", // otherwise automated jest tests fail + "waitFor": "postCreateCommand", // The Oxc formatter needs the installed oxfmt "features": { "node": { "version": "24" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2c9cb2b5341c..ab9cfd7bc8e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -112,7 +112,7 @@ You can also try using the new [github.dev](https://github.dev/facebook/docusaur - **Most important: Look around.** Match the style you see used in the rest of the project. This includes formatting, naming files, naming things in code, naming things in documentation, etc. - "Attractive" -- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, they should automatically fix some issues during every git commit. +- We do have oxfmt (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, they should automatically fix some issues during every git commit. - **For documentation**: Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation. Don't worry too much about styles in general—the maintainers will help you fix them as they review your code. diff --git a/README.md b/README.md index 1d411f780d5d..84333e25d5ca 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,7 @@ GitHub Actions status PRs Welcome Discord Chat - code style: prettier - Tested with Jest Covered by Argos Gitpod Ready-to-Code Netlify Status