Skip to content

Commit 3c03f62

Browse files
merging all conflicts
2 parents 8488609 + 2534424 commit 3c03f62

File tree

128 files changed

+3010
-584
lines changed

Some content is hidden

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

128 files changed

+3010
-584
lines changed

.github/ISSUE_TEMPLATE/3-framework.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ body:
88
value: |
99
## Apply to be included as a recommended React framework
1010
11-
_This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/start-a-new-react-project). If you are not a framework author, please contact the authors before submitting._
11+
_This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/creating-a-react-app). If you are not a framework author, please contact the authors before submitting._
1212
1313
Our goal when recommending a framework is to start developers with a React project that solves common problems like code splitting, data fetching, routing, and HTML generation without any extra work later. We believe this will allow users to get started quickly with React, and scale their app to production.
1414
15-
While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision).
15+
While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/creating-a-react-app#which-features-make-up-the-react-teams-full-stack-architecture-vision).
1616
1717
To be included, frameworks must meet the following criteria:
1818

next.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ const nextConfig = {
3636
// Don't bundle the shim unnecessarily.
3737
config.resolve.alias['use-sync-external-store/shim'] = 'react';
3838

39+
// ESLint depends on the CommonJS version of esquery,
40+
// but Webpack loads the ESM version by default. This
41+
// alias ensures the correct version is used.
42+
//
43+
// More info:
44+
// https://github.com/reactjs/react.dev/pull/8115
45+
config.resolve.alias['esquery'] = 'esquery/dist/esquery.min.js';
46+
3947
const {IgnorePlugin, NormalModuleReplacementPlugin} = require('webpack');
4048
config.plugins.push(
4149
new NormalModuleReplacementPlugin(

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@
6363
"asyncro": "^3.0.0",
6464
"autoprefixer": "^10.4.2",
6565
"babel-eslint": "10.x",
66+
<<<<<<< HEAD
6667
"babel-plugin-react-compiler": "^19.1.0-rc.3",
68+
=======
69+
"babel-plugin-react-compiler": "^1.0.0",
70+
>>>>>>> 2534424ec6c433cc2c811d5a0bd5a65b75efa5f0
6771
"chalk": "4.1.2",
6872
"eslint": "7.x",
6973
"eslint-config-next": "12.0.3",

plugins/remark-smartypants.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,24 @@ const visit = require('unist-util-visit');
1414
const retext = require('retext');
1515
const smartypants = require('retext-smartypants');
1616

17-
function check(parent) {
17+
function check(node, parent) {
18+
if (node.data?.skipSmartyPants) return false;
1819
if (parent.tagName === 'script') return false;
1920
if (parent.tagName === 'style') return false;
2021
return true;
2122
}
2223

24+
function markSkip(node) {
25+
if (!node) return;
26+
node.data ??= {};
27+
node.data.skipSmartyPants = true;
28+
if (Array.isArray(node.children)) {
29+
for (const child of node.children) {
30+
markSkip(child);
31+
}
32+
}
33+
}
34+
2335
module.exports = function (options) {
2436
const processor = retext().use(smartypants, {
2537
...options,
@@ -43,8 +55,14 @@ module.exports = function (options) {
4355
let startIndex = 0;
4456
const textOrInlineCodeNodes = [];
4557

58+
visit(tree, 'mdxJsxFlowElement', (node) => {
59+
if (['TerminalBlock'].includes(node.name)) {
60+
markSkip(node); // Mark all children to skip smarty pants
61+
}
62+
});
63+
4664
visit(tree, ['text', 'inlineCode'], (node, _, parent) => {
47-
if (check(parent)) {
65+
if (check(node, parent)) {
4866
if (node.type === 'text') allText += node.value;
4967
// for the case when inlineCode contains just one part of quote: `foo'bar`
5068
else allText += 'A'.repeat(node.value.length);
291 KB
130 KB
292 KB
122 KB
121 KB
51.7 KB

0 commit comments

Comments
 (0)