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/.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/.gitignore b/.gitignore
index 89a2c671fac8..1808f4a36ce7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,8 +18,6 @@ yarn-error.log
website/build
coverage
.docusaurus
-.cache-loader
-types
test-website
test-website-in-workspace
@@ -30,10 +28,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,12 +37,9 @@ CrowdinTranslations_*.zip
website/.cpu-prof
website/i18n/**/*
-#!website/i18n/fr
-#!website/i18n/fr/**/*
.netlify
-website/rspack-tracing.json
website/rspack-tracing.pftrace
website/bundler-cpu-profile.json
website/profile.json.gz
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/.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/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 @@
-
-
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}`,
);
diff --git a/eslint.config.ts b/eslint.config.ts
index 43b962b27b76..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',
@@ -75,7 +74,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/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',
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"
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
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/**',
];