Skip to content

Commit a1d3bce

Browse files
authored
chore: docs, prettier fixes (#8400)
## Summary Fixing a bunch of problems in the repo and the docs. This PR was extracted from #7702. Key changes: - Bumped prettier repo-wise. - Bump eslint-plugin-jsdoc since it was bugged with newer prettier. - Updated the use of prettier in docs. - Moves prettier and typescript to explicit dependencies of the docs. - Fixed broken anchors in the docs. - Bumped Reanimated and Worklets in docs be able to import `DynamicColorIOS`. - Ignored webpack-typescript related error. - Bump docusarus deps to exact versions in docs. - Fixed deprecated import uses in the docs. - Made the docs throw on broken anchors. ## Test plan CI. The docs run fine locally.
1 parent c27ed14 commit a1d3bce

File tree

41 files changed

+228
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+228
-209
lines changed

apps/common-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"jest": "^29.6.3",
7171
"madge": "^5.0.1",
7272
"patch-package": "^8.0.0",
73-
"prettier": "^3.3.3",
73+
"prettier": "3.6.2",
7474
"react-native": "0.82.0",
7575
"react-native-monorepo-tools": "^1.2.1",
7676
"react-test-renderer": "19.1.1",

apps/fabric-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"react-native": "0.82.0"
1616
},
1717
"devDependencies": {
18-
"prettier": "^3.3.3"
18+
"prettier": "3.6.2"
1919
},
2020
"engines": {
2121
"node": ">=20.13.0"

apps/macos-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@react-native/eslint-config": "0.75.4",
2525
"@react-native/metro-config": "0.75.4",
2626
"@react-native/typescript-config": "0.75.4",
27-
"prettier": "^3.3.3"
27+
"prettier": "3.6.2"
2828
},
2929
"engines": {
3030
"node": ">=20.13.0"

apps/next-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"cypress": "^13.2.0",
3131
"eslint": "^9.29.0",
3232
"next-compose-plugins": "^2.2.1",
33-
"prettier": "^3.3.3",
33+
"prettier": "3.6.2",
3434
"start-server-and-test": "^2.0.1"
3535
},
3636
"installConfig": {

apps/tvos-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"babel-jest": "^29.6.3",
3232
"eslint": "^9.29.0",
3333
"jest": "^29.6.3",
34-
"prettier": "^3.3.3",
34+
"prettier": "3.6.2",
3535
"react-test-renderer": "19.1.0",
3636
"typescript": "^5.8.3"
3737
},

apps/web-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"devDependencies": {
2222
"@expo/metro-runtime": "~6.1.1",
2323
"@stylexjs/babel-plugin": "^0.10.0",
24-
"prettier": "^3.3.3",
24+
"prettier": "3.6.2",
2525
"serve": "^14.2.3"
2626
},
2727
"installConfig": {

docs/docs-reanimated/docs/guides/troubleshooting.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ See [Couldn't determine the version of the native part of Reanimated](#couldnt-d
6363

6464
### Mismatch between C++ code version and JavaScript code version
6565

66-
See [Mismatch between JavaScript part and native part of Reanimated](#mismatch-between-javascript-part-and-native-part-of-reanimated) and [Mismatch between JavaScript code version and Reanimated Babel plugin version](#mismatch-between-javascript-code-version-and-reanimated-babel-plugin-version).
66+
See [Mismatch between JavaScript part and native part of Reanimated](#mismatch-between-javascript-part-and-native-part-of-reanimated) and [Mismatch between JavaScript code version and Reanimated Babel plugin version](https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#mismatch-between-javascript-code-version-and-worklets-babel-plugin-version).
6767

6868
### C++ side failed to resolve Java code version
6969

@@ -75,7 +75,7 @@ See [Mismatch between JavaScript part and native part of Reanimated](#mismatch-b
7575

7676
**Problem:** This happens when Reanimated has different versions of its C++ and Java parts.
7777

78-
**Solution:** See [Native side failed to resolve Java code version](#c-side-failed-to-resolve-javas-code-version).
78+
**Solution:** See [Native side failed to resolve Java code version](#c-side-failed-to-resolve-java-code-version).
7979

8080
### Java side failed to resolve C++ code version
8181

docs/docs-reanimated/docs/guides/web-support.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const dv = useDerivedValue(() => sv.value, [sv]);
139139

140140
## Solito / Next.js Compatibility
141141

142-
There is an experimental SWC plugin in the works. However, given that this may not work properly, you can use the [Web without a Babel plugin](#web-without-a-babel-plugin) instructions above.
142+
There is an experimental SWC plugin in the works. However, given that this may not work properly, you can use the [Web without a Babel plugin](#web-without-the-babel-plugin) instructions above.
143143

144144
### Next.js Polyfill
145145

docs/docs-reanimated/docusaurus.config.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ const config = {
3030
},
3131
],
3232

33+
markdown: {
34+
hooks: {
35+
onBrokenMarkdownLinks: 'throw',
36+
},
37+
},
38+
3339
onBrokenLinks: 'throw',
34-
onBrokenMarkdownLinks: 'throw',
40+
onBrokenAnchors: 'throw',
3541

3642
// Even if you don't use internalization, you can use this field to set useful
3743
// metadata like html lang. For example, if your site is Chinese, you may want
@@ -213,6 +219,24 @@ const config = {
213219
alias: { 'react-native$': 'react-native-web' },
214220
extensions: ['.web.js', '...'],
215221
},
222+
ignoreWarnings: [
223+
(error) => {
224+
/*
225+
* Ignore warning we can't fix:
226+
* "moduleName":"./node_modules/typescript/lib/typescript.js","loc":"50:2440-2459","message":"Critical dependency: the request of a dependency is an expression"
227+
*/
228+
if (
229+
error.message.includes(
230+
'Critical dependency: the request of a dependency is an expression'
231+
) &&
232+
// @ts-expect-error Not exposed type.
233+
error?.module?.context?.includes('typescript/lib')
234+
) {
235+
return true;
236+
}
237+
return false;
238+
},
239+
],
216240
};
217241
},
218242
};

docs/docs-reanimated/package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"@babel/preset-react": "7.27.1",
2525
"@dnd-kit/core": "^6.3.1",
2626
"@dnd-kit/modifiers": "^9.0.0",
27-
"@docusaurus/core": "^3.8.1",
28-
"@docusaurus/plugin-debug": "^3.8.1",
29-
"@docusaurus/preset-classic": "^3.8.1",
27+
"@docusaurus/core": "3.9.1",
28+
"@docusaurus/plugin-debug": "3.9.1",
29+
"@docusaurus/preset-classic": "3.9.1",
3030
"@emotion/react": "11.14.0",
3131
"@emotion/styled": "11.14.0",
3232
"@mdx-js/react": "3.0.0",
@@ -41,6 +41,7 @@
4141
"babel-preset-react-native": "4.0.1",
4242
"clsx": "2.1.0",
4343
"glob": "10.4.2",
44+
"prettier": "3.6.2",
4445
"prism-react-renderer": "2.1.0",
4546
"raf": "3.4.1",
4647
"raw-loader": "4.0.2",
@@ -49,24 +50,24 @@
4950
"react-dom": "^19.1.1",
5051
"react-native": "0.71.4",
5152
"react-native-gesture-handler": "^2.28.0",
52-
"react-native-reanimated": "4.0.0",
53+
"react-native-reanimated": "4.2.0-nightly-20251015-0297d2990",
5354
"react-native-svg": "15.12.0",
5455
"react-native-web": "^0.21.1",
55-
"react-native-worklets": "0.4.0",
56+
"react-native-worklets": "0.7.0-nightly-20251015-0297d2990",
5657
"source-map": "0.7.4",
5758
"source-map-loader": "4.0.1",
59+
"typescript": "5.8.3",
5860
"usehooks-ts": "2.9.1"
5961
},
6062
"devDependencies": {
6163
"@babel/preset-flow": "7.25.9",
62-
"@docusaurus/module-type-aliases": "^3.8.1",
63-
"@docusaurus/tsconfig": "3.8.1",
64-
"@docusaurus/types": "3.8.1",
64+
"@docusaurus/module-type-aliases": "3.9.1",
65+
"@docusaurus/tsconfig": "3.9.1",
66+
"@docusaurus/types": "3.9.1",
6567
"copy-webpack-plugin": "11.0.0",
6668
"esbuild": "0.25.0",
6769
"esbuild-register": "3.5.0",
6870
"eslint-plugin-mdx": "2.2.0",
69-
"prettier": "2.8.4",
7071
"webpack-cli": "5.0.1"
7172
},
7273
"browserslist": {

0 commit comments

Comments
 (0)