Skip to content

Commit e2a2ed2

Browse files
authored
docs: minor improvements (#1086)
1 parent 42ca976 commit e2a2ed2

File tree

6 files changed

+28
-31
lines changed

6 files changed

+28
-31
lines changed

examples/vite-react-dom-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"eslint-plugin-react-refresh": "^0.4.19",
3030
"typescript": "^5.8.3",
3131
"typescript-eslint": "^8.30.1",
32-
"vite": "^6.3.0"
32+
"vite": "^6.3.1"
3333
},
3434
"engines": {
3535
"node": ">=18.18.0"

examples/vite-react-dom-js-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"eslint-plugin-react-hooks": "^5.2.0",
2626
"eslint-plugin-react-refresh": "^0.4.19",
2727
"globals": "^16.0.0",
28-
"vite": "^6.3.0"
28+
"vite": "^6.3.1"
2929
},
3030
"engines": {
3131
"node": ">=18.18.0"

examples/vite-react-dom-js-with-babel-eslint-parser-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"eslint-plugin-react-web-api": "workspace:*",
3737
"eslint-plugin-react-x": "workspace:*",
3838
"globals": "^16.0.0",
39-
"vite": "^6.3.0"
39+
"vite": "^6.3.1"
4040
},
4141
"engines": {
4242
"node": ">=18.18.0"

examples/vite-react-dom-with-ts-blank-eslint-parser-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"ts-blank-eslint-parser": "^0.4.3",
3434
"typescript": "^5.8.3",
3535
"typescript-eslint": "^8.30.1",
36-
"vite": "^6.3.0"
36+
"vite": "^6.3.1"
3737
},
3838
"engines": {
3939
"node": ">=18.18.0"

packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-event-listener.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ function useCustomHook() {
255255

256256
### Failing
257257

258-
The following cases are intentionally considered as possible leaks:
259-
260258
```tsx
261259
import { useEffect } from "react";
262260

@@ -265,7 +263,7 @@ function MyComponent() {
265263
if (!el) {
266264
return;
267265
}
268-
266+
// The following cases are intentionally considered as possible leaks:
269267
for (const [name, handler] of Object.entries(handlers)) {
270268
// ^^^^^^^^^^^^^^^^^^^^^^^^^
271269
// - The entries are not guaranteed to be the same as the ones in the effect cleanup function.
@@ -287,8 +285,6 @@ function MyComponent() {
287285

288286
### Passing
289287

290-
Instead, you should always use the same entries in both the setup and cleanup functions:
291-
292288
```tsx
293289
import { useEffect } from "react";
294290

@@ -298,6 +294,7 @@ function MyComponent() {
298294
return;
299295
}
300296

297+
// Instead, always use the same entries in both the setup and cleanup functions:
301298
const handlerEntries = Object.entries(handlers); // <- Use the same entries array
302299

303300
for (const [name, handler] of handlerEntries) {

pnpm-lock.yaml

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)