Skip to content

Commit a79471d

Browse files
merging all conflicts
2 parents 2294259 + 366b5fb commit a79471d

File tree

366 files changed

+34434
-6194
lines changed

Some content is hidden

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

366 files changed

+34434
-6194
lines changed

.eslintrc

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,36 @@
22
"root": true,
33
"extends": "next/core-web-vitals",
44
"parser": "@typescript-eslint/parser",
5-
"plugins": ["@typescript-eslint"],
5+
"plugins": ["@typescript-eslint", "eslint-plugin-react-compiler", "local-rules"],
66
"rules": {
77
"no-unused-vars": "off",
8-
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }],
9-
"react-hooks/exhaustive-deps": "error"
8+
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
9+
"react-hooks/exhaustive-deps": "error",
10+
"react/no-unknown-property": ["error", {"ignore": ["meta"]}],
11+
"react-compiler/react-compiler": "error",
12+
"local-rules/lint-markdown-code-blocks": "error"
1013
},
1114
"env": {
1215
"node": true,
1316
"commonjs": true,
1417
"browser": true,
1518
"es6": true
16-
}
19+
},
20+
"overrides": [
21+
{
22+
"files": ["src/content/**/*.md"],
23+
"parser": "./eslint-local-rules/parser",
24+
"parserOptions": {
25+
"sourceType": "module"
26+
},
27+
"rules": {
28+
"no-unused-vars": "off",
29+
"@typescript-eslint/no-unused-vars": "off",
30+
"react-hooks/exhaustive-deps": "off",
31+
"react/no-unknown-property": "off",
32+
"react-compiler/react-compiler": "off",
33+
"local-rules/lint-markdown-code-blocks": "error"
34+
}
35+
}
36+
]
1737
}

.github/workflows/analyze.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- main # change this if your default branch is named differently
88
workflow_dispatch:
99

10+
permissions: {}
11+
1012
jobs:
1113
analyze:
1214
runs-on: ubuntu-latest
@@ -23,7 +25,11 @@ jobs:
2325
- name: Restore cached node_modules
2426
uses: actions/cache@v4
2527
with:
28+
<<<<<<< HEAD
2629
path: "**/node_modules"
30+
=======
31+
path: '**/node_modules'
32+
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
2733
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
2834

2935
- name: Install deps
@@ -55,7 +61,7 @@ jobs:
5561
name: bundle_analysis.json
5662

5763
- name: Download base branch bundle stats
58-
uses: dawidd6/action-download-artifact@v2
64+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
5965
if: success() && github.event.number
6066
with:
6167
workflow: analyze.yml

.github/workflows/analyze_comment.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: Analyze Bundle (Comment)
22

33
on:
44
workflow_run:
5-
workflows: ["Analyze Bundle"]
5+
workflows: ['Analyze Bundle']
66
types:
77
- completed
88

9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
914
jobs:
1015
comment:
1116
runs-on: ubuntu-latest
@@ -14,15 +19,15 @@ jobs:
1419
github.event.workflow_run.conclusion == 'success' }}
1520
steps:
1621
- name: Download base branch bundle stats
17-
uses: dawidd6/action-download-artifact@v2
22+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
1823
with:
1924
workflow: analyze.yml
2025
run_id: ${{ github.event.workflow_run.id }}
2126
name: analysis_comment.txt
2227
path: analysis_comment.txt
2328

2429
- name: Download PR number
25-
uses: dawidd6/action-download-artifact@v2
30+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
2631
with:
2732
workflow: analyze.yml
2833
run_id: ${{ github.event.workflow_run.id }}
@@ -48,7 +53,7 @@ jobs:
4853
echo "pr-number=$pr_number" >> $GITHUB_OUTPUT
4954
5055
- name: Comment
51-
uses: marocchino/sticky-pull-request-comment@v2
56+
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
5257
with:
5358
header: next-bundle-analysis
5459
number: ${{ steps.get-comment-body.outputs.pr-number }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Discord Notify
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, ready_for_review]
6+
7+
permissions: {}
8+
9+
jobs:
10+
check_maintainer:
11+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
12+
permissions:
13+
# Used by check_maintainer
14+
contents: read
15+
with:
16+
actor: ${{ github.event.pull_request.user.login }}
17+
18+
notify:
19+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
20+
needs: check_maintainer
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Discord Webhook Action
24+
uses: tsickert/[email protected]
25+
with:
26+
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
27+
embed-author-name: ${{ github.event.pull_request.user.login }}
28+
embed-author-url: ${{ github.event.pull_request.user.html_url }}
29+
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
30+
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
31+
embed-description: ${{ github.event.pull_request.body }}
32+
embed-url: ${{ github.event.pull_request.html_url }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Label Core Team PRs
2+
3+
on:
4+
pull_request_target:
5+
6+
permissions: {}
7+
8+
env:
9+
TZ: /usr/share/zoneinfo/America/Los_Angeles
10+
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
11+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
12+
13+
jobs:
14+
check_maintainer:
15+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
16+
permissions:
17+
# Used by check_maintainer
18+
contents: read
19+
with:
20+
actor: ${{ github.event.pull_request.user.login }}
21+
22+
label:
23+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
24+
runs-on: ubuntu-latest
25+
needs: check_maintainer
26+
permissions:
27+
# Used to add labels on issues
28+
issues: write
29+
# Used to add labels on PRs
30+
pull-requests: write
31+
steps:
32+
- name: Label PR as React Core Team
33+
uses: actions/github-script@v7
34+
with:
35+
script: |
36+
github.rest.issues.addLabels({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
issue_number: ${{ github.event.number }},
40+
labels: ['React Core Team']
41+
});

.github/workflows/site_lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
types: [opened, synchronize, reopened]
99

10+
permissions: {}
11+
1012
jobs:
1113
lint:
1214
runs-on: ubuntu-latest
@@ -25,7 +27,11 @@ jobs:
2527
- name: Restore cached node_modules
2628
uses: actions/cache@v4
2729
with:
30+
<<<<<<< HEAD
2831
path: "**/node_modules"
32+
=======
33+
path: '**/node_modules'
34+
>>>>>>> 366b5fbdadefecbbf9f6ef36c0342c083248c691
2935
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3036

3137
- name: Install deps

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
4+
node_modules
55
/.pnp
66
.pnp.js
77

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This repo contains the source code and documentation powering [reactjs.org](http
77
### Prerequisites
88

99
1. Git
10-
1. Node: any 12.x version starting with v12.0.0 or greater
10+
1. Node: any version starting with v16.8.0 or greater
1111
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1212
1. A fork of the repo (for any contributions)
1313
1. A clone of the [ar.react.dev repo](https://github.com/reactjs/ar.react.dev) on your local machine

colors.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
18
/*
29
* Copyright (c) Facebook, Inc. and its affiliates.
310
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
```jsx
2+
import {useState} from 'react';
3+
function Counter() {
4+
const [count, setCount] = useState(0);
5+
setCount(count + 1);
6+
return <div>{count}</div>;
7+
}
8+
```

0 commit comments

Comments
 (0)