Skip to content

Commit ac8ab73

Browse files
committed
Use Node 24 and remove obsolete syntax examples
1 parent c598a5a commit ac8ab73

5 files changed

Lines changed: 8 additions & 39 deletions

File tree

‎.github/workflows/analyze.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
- name: Set up node
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: '20.x'
21+
node-version: '24.x'
2222
cache: yarn
2323
cache-dependency-path: yarn.lock
2424

2525
- name: Restore cached node_modules
2626
uses: actions/cache@v4
2727
with:
2828
path: '**/node_modules'
29-
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
29+
key: node_modules-24-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3030

3131
- name: Install deps
3232
run: yarn install --frozen-lockfile

‎.github/workflows/site_lint.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ jobs:
1313
lint:
1414
runs-on: ubuntu-latest
1515

16-
name: Lint on node 20.x and ubuntu-latest
16+
name: Lint on node 24.x and ubuntu-latest
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Use Node.js 20.x
20+
- name: Use Node.js 24.x
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: 20.x
23+
node-version: 24.x
2424
cache: yarn
2525
cache-dependency-path: yarn.lock
2626

2727
- name: Restore cached node_modules
2828
uses: actions/cache@v4
2929
with:
3030
path: '**/node_modules'
31-
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
31+
key: node_modules-24-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3232

3333
- name: Install deps
3434
run: yarn install --frozen-lockfile

‎CONTRIBUTING.md‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,6 @@ Ignore this if you're specifically writing about ES5.
4242

4343
Choose syntax that makes each example easier to follow. Prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. Use arrow functions when they make callbacks easier to read. In class components, arrow functions can also preserve the component's `this` value.
4444

45-
#### Don't use features that aren't standardized yet.
46-
47-
For example, **don't** write this:
48-
49-
```js
50-
function Greeting({isLoggedIn}) {
51-
return do {
52-
if (isLoggedIn) {
53-
<h1>Welcome back!</h1>;
54-
} else {
55-
<h1>Please sign in.</h1>;
56-
}
57-
};
58-
}
59-
```
60-
61-
The [`do` expression syntax](https://github.com/tc39/proposal-do-expressions) is still experimental.
62-
63-
Instead, **do** write this:
64-
65-
```js
66-
function Greeting({isLoggedIn}) {
67-
if (isLoggedIn) {
68-
return <h1>Welcome back!</h1>;
69-
}
70-
return <h1>Please sign in.</h1>;
71-
}
72-
```
73-
74-
Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text.
75-
7645
### Style
7746

7847
- Use semicolons.

‎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 [react.dev](https:
77
### Prerequisites
88

99
1. Git
10-
1. Node: v18.18.0 or greater
10+
1. Node: v24 or greater
1111
1. Yarn Classic: See [Yarn website for installation instructions](https://classic.yarnpkg.com/en/docs/install/)
1212
1. A fork of the repo (for any contributions)
1313
1. A clone of the [react.dev repo](https://github.com/reactjs/react.dev) on your local machine

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"webpack-bundle-analyzer": "^4.5.0"
112112
},
113113
"engines": {
114-
"node": "^18.18.0 || ^19.8.0 || >=20.0.0"
114+
"node": ">=24"
115115
},
116116
"nextBundleAnalysis": {
117117
"budget": null,

0 commit comments

Comments
 (0)