Skip to content

Commit 80a4d4c

Browse files
committed
Merge branch 'facebook-main'
2 parents a465fa8 + 39430a1 commit 80a4d4c

File tree

84 files changed

+8838
-1562
lines changed

Some content is hidden

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

84 files changed

+8838
-1562
lines changed

.eslintignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
node_modules/
2-
build
3-
my-app*
4-
packages/react-scripts/template
5-
packages/react-scripts/fixtures
6-
fixtures/
2+
build/
3+
test/fixtures/webpack-message-formatting/src/AppBabel.js
4+
packages/react-error-overlay/lib/

.eslintrc.json

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,39 @@
1414
"no-console": "off",
1515
"strict": ["error", "global"],
1616
"curly": "warn"
17-
}
17+
},
18+
"overrides": [
19+
{
20+
"files": [
21+
"docusaurus/website/src/**/*.js",
22+
"packages/cra-template/**/*.js",
23+
"packages/react-error-overlay/**/*.js",
24+
"packages/react-scripts/fixtures/kitchensink/template/{src,integration}/**/*.js",
25+
"test/fixtures/*/src/*.js"
26+
],
27+
"excludedFiles": ["packages/react-error-overlay/*.js"],
28+
"extends": ["react-app", "react-app/jest"]
29+
},
30+
{
31+
"files": [
32+
"test/fixtures/webpack-message-formatting/src/{AppLintError,AppLintWarning,AppUnknownFile}.js"
33+
],
34+
"rules": {
35+
"no-unused-vars": "off",
36+
"no-undef": "off"
37+
}
38+
},
39+
{
40+
"files": ["test/fixtures/webpack-message-formatting/src/Export5.js"],
41+
"rules": {
42+
"import/no-anonymous-default-export": "off"
43+
}
44+
},
45+
{
46+
"files": ["test/fixtures/issue-5176-flow-class-properties/src/App.js"],
47+
"rules": {
48+
"no-dupe-class-members": "off"
49+
}
50+
}
51+
]
1852
}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

.github/workflows/lint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Lint
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
lint:
@@ -15,5 +15,11 @@ jobs:
1515
run: npm i -g npm@8
1616
- name: Install
1717
run: npm ci --prefer-offline
18+
- name: Build
19+
run: npm run build
1820
- name: Alex
1921
run: npm run alex
22+
- name: Prettier
23+
run: npm run prettier -- --list-different
24+
- name: Eslint
25+
run: npm run eslint -- --max-warnings 0

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.idea/
22
.vscode/
33
node_modules/
4-
build
4+
build/
55
.DS_Store
66
*.tgz
77
my-app*

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
build/
2+
package-lock.json
3+
test/fixtures/webpack-message-formatting/src/AppBabel.js
4+
test/fixtures/webpack-message-formatting/src/AppCss.css
5+
packages/react-error-overlay/fixtures/bundle*
6+
packages/react-error-overlay/fixtures/inline*
7+
packages/react-error-overlay/fixtures/junk*
8+
packages/react-error-overlay/lib/
9+
packages/react-error-overlay/coverage/

CHANGELOG-4.x.md

Lines changed: 503 additions & 0 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 149 additions & 415 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Create React App is a great fit for:
171171

172172
Here are a few common cases where you might want to try something else:
173173

174-
- If you want to **try React** without hundreds of transitive build tool dependencies, consider [using a single HTML file or an online sandbox instead](https://reactjs.org/docs/try-react.html).
174+
- If you want to **try React** without hundreds of transitive build tool dependencies, consider [using a single HTML file or an online sandbox instead](https://reactjs.org/docs/getting-started.html#try-react).
175175

176176
- If you need to **integrate React code with a server-side template framework** like Rails, Django or Symfony, or if you’re **not building a single-page app**, consider using [nwb](https://github.com/insin/nwb), or [Neutrino](https://neutrino.js.org/) which are more flexible. For Rails specifically, you can use [Rails Webpacker](https://github.com/rails/webpacker). For Symfony, try [Symfony's webpack Encore](https://symfony.com/doc/current/frontend/encore/reactjs.html).
177177

@@ -185,7 +185,7 @@ Here are a few common cases where you might want to try something else:
185185

186186
All of the above tools can work with little to no configuration.
187187

188-
If you prefer configuring the build yourself, [follow this guide](https://reactjs.org/docs/add-react-to-an-existing-app.html).
188+
If you prefer configuring the build yourself, [follow this guide](https://reactjs.org/docs/add-react-to-a-website.html).
189189

190190
## React Native
191191

docusaurus/docs/adding-a-router.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ id: adding-a-router
33
title: Adding a Router
44
---
55

6-
Create React App doesn't prescribe a specific routing solution, but [React Router](https://reacttraining.com/react-router/web/) is the most popular one.
6+
Create React App doesn't prescribe a specific routing solution, but [React Router](https://reactrouter.com/) is the most popular one.
77

88
To add it, run:
99

1010
```sh
11-
npm install --save react-router-dom
11+
npm install react-router-dom
1212
```
1313

1414
Alternatively you may use `yarn`:
@@ -17,6 +17,6 @@ Alternatively you may use `yarn`:
1717
yarn add react-router-dom
1818
```
1919

20-
To try it, delete all the code in `src/App.js` and replace it with any of the examples on its website. The [Basic Example](https://reacttraining.com/react-router/web/example/basic) is a good place to get started.
20+
To try it, delete all the code in `src/App.js` and replace it with any of the examples on its website. The [Basic Example](https://reactrouter.com/docs/examples/basic) is a good place to get started. For more info on adding routes, check out [the React Router docs on adding routes](https://reactrouter.com/docs/getting-started/tutorial#add-some-routes).
2121

2222
Note that [you may need to configure your production server to support client-side routing](deployment.md#serving-apps-with-client-side-routing) before deploying your app.

0 commit comments

Comments
 (0)