From 5a714d670b99788121cb2b99ad054741feb1385e Mon Sep 17 00:00:00 2001 From: Gilad Shoham Date: Sun, 2 Aug 2026 17:08:47 +0300 Subject: [PATCH 1/2] fix: correct MDX comment syntax and exclude from prettier Prettier incorrectly escapes JSX comment markers (/* */) inside these MDX files' code blocks, breaking the comment syntax. Exclude them from prettier and fix the existing escaping. --- .prettierignore | 5 ++++- scopes/react/aspect-docs/react/react.mdx | 4 ++-- scopes/react/ui/loader-fallback/loader-fallback.docs.mdx | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.prettierignore b/.prettierignore index 3f6e83a0a1e1..da4bb4bb1e23 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,6 @@ fixtures e2e/fixtures -components/legacy/e2e-helper/excluded-fixtures \ No newline at end of file +components/legacy/e2e-helper/excluded-fixtures +# MDX files with JSX comments that prettier incorrectly escapes +scopes/react/aspect-docs/react/react.mdx +scopes/react/ui/loader-fallback/loader-fallback.docs.mdx \ No newline at end of file diff --git a/scopes/react/aspect-docs/react/react.mdx b/scopes/react/aspect-docs/react/react.mdx index 234f75b2d975..1782f8fe2c49 100644 --- a/scopes/react/aspect-docs/react/react.mdx +++ b/scopes/react/aspect-docs/react/react.mdx @@ -169,7 +169,7 @@ export class CustomReactExtension { } ``` -{/* ## Composition Providers +{/\* ## Composition Providers The React environment is able to "wrap" component compositions with an array of providers, each of which is simply a component which wraps its `children` with functionality, such as a context, styling, theme, etc. @@ -226,7 +226,7 @@ export class ReactWithProvidersPreview { ReactWithProvidersAspect.addRuntime(ReactWithProvidersPreview) ``` -> See the full demo project [here](https://github.com/teambit/react-env-with-providers). */} +> See the full demo project [here](https://github.com/teambit/react-env-with-providers). \*/} ### Transformers API docs diff --git a/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx b/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx index abc84697c65a..8ac3e556b553 100644 --- a/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx +++ b/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx @@ -22,7 +22,7 @@ const safeTarget = useFallback(Target && , , { tim 1. then, after _x_ seconds - show the default. {/* live playground doesn't keep state when editing :( */} -{/* Try it out: +{/\* Try it out: ```tsx live function Example() { From 235f6d700070c24d78719ea77f422c9367e036bc Mon Sep 17 00:00:00 2001 From: Gilad Shoham Date: Sun, 2 Aug 2026 22:15:11 +0300 Subject: [PATCH 2/2] fix: revert accidental comment re-escaping, keep only prettierignore fix The mdx files already had correct, unescaped JSX comments matching master. Only the prettierignore protection against prettier's corruption bug was needed. --- scopes/react/aspect-docs/react/react.mdx | 4 ++-- scopes/react/ui/loader-fallback/loader-fallback.docs.mdx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scopes/react/aspect-docs/react/react.mdx b/scopes/react/aspect-docs/react/react.mdx index 1782f8fe2c49..234f75b2d975 100644 --- a/scopes/react/aspect-docs/react/react.mdx +++ b/scopes/react/aspect-docs/react/react.mdx @@ -169,7 +169,7 @@ export class CustomReactExtension { } ``` -{/\* ## Composition Providers +{/* ## Composition Providers The React environment is able to "wrap" component compositions with an array of providers, each of which is simply a component which wraps its `children` with functionality, such as a context, styling, theme, etc. @@ -226,7 +226,7 @@ export class ReactWithProvidersPreview { ReactWithProvidersAspect.addRuntime(ReactWithProvidersPreview) ``` -> See the full demo project [here](https://github.com/teambit/react-env-with-providers). \*/} +> See the full demo project [here](https://github.com/teambit/react-env-with-providers). */} ### Transformers API docs diff --git a/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx b/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx index 8ac3e556b553..abc84697c65a 100644 --- a/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx +++ b/scopes/react/ui/loader-fallback/loader-fallback.docs.mdx @@ -22,7 +22,7 @@ const safeTarget = useFallback(Target && , , { tim 1. then, after _x_ seconds - show the default. {/* live playground doesn't keep state when editing :( */} -{/\* Try it out: +{/* Try it out: ```tsx live function Example() {