Skip to content

Commit 2faee3d

Browse files
committed
feat(linter): fix grammer in react/exhaustive-deps (#11527)
1 parent baf72df commit 2faee3d

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

crates/oxc_linter/src/rules/react/exhaustive_deps.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn unnecessary_outer_scope_dependency_diagnostic(
134134
"React Hook {hook_name} has an unnecessary dependency: {dep_name}."
135135
))
136136
.with_label(span)
137-
.with_help("Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.")
137+
.with_help("Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.")
138138
.with_error_code_scope(SCOPE)
139139
}
140140

crates/oxc_linter/src/snapshots/react_exhaustive_deps.snap

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ source: crates/oxc_linter/src/tester.rs
233233
· ──────
234234
9 │ }
235235
╰────
236-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
236+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
237237

238238
eslint-plugin-react-hooks(exhaustive-deps): React Hook useCallback has a missing dependency: 'local2'
239239
╭─[exhaustive_deps.tsx:8:16]
@@ -278,7 +278,7 @@ source: crates/oxc_linter/src/tester.rs
278278
· ──────
279279
3 │ }
280280
╰────
281-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
281+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
282282

283283
eslint-plugin-react(exhaustive-deps): React Hook useCallback has unnecessary dependency: window
284284
╭─[exhaustive_deps.tsx:2:33]
@@ -942,7 +942,7 @@ source: crates/oxc_linter/src/tester.rs
942942
· ────────────
943943
10 │ }
944944
╰────
945-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
945+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
946946
947947
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: ref2.
948948
╭─[exhaustive_deps.tsx:9:29]
@@ -951,7 +951,7 @@ source: crates/oxc_linter/src/tester.rs
951951
· ────────────
952952
10 │ }
953953
╰────
954-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
954+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
955955
956956
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: ref1.
957957
╭─[exhaustive_deps.tsx:9:15]
@@ -960,7 +960,7 @@ source: crates/oxc_linter/src/tester.rs
960960
· ─────────────
961961
10 │ }
962962
╰────
963-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
963+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
964964
965965
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: ref2.
966966
╭─[exhaustive_deps.tsx:9:30]
@@ -969,7 +969,7 @@ source: crates/oxc_linter/src/tester.rs
969969
· ─────────────
970970
10 │ }
971971
╰────
972-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
972+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
973973
974974
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: ref.
975975
╭─[exhaustive_deps.tsx:5:15]
@@ -978,7 +978,7 @@ source: crates/oxc_linter/src/tester.rs
978978
· ───────────
979979
6 │ }
980980
╰────
981-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
981+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
982982
983983
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: ref1.
984984
╭─[exhaustive_deps.tsx:7:15]
@@ -987,7 +987,7 @@ source: crates/oxc_linter/src/tester.rs
987987
· ────────────
988988
8 │ }
989989
╰────
990-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
990+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
991991
992992
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: ref2.
993993
╭─[exhaustive_deps.tsx:7:29]
@@ -996,7 +996,7 @@ source: crates/oxc_linter/src/tester.rs
996996
· ────────────
997997
8 │ }
998998
╰────
999-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
999+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
10001000
10011001
eslint-plugin-react-hooks(exhaustive-deps): React Hook useCallback has an unnecessary dependency: ref1.
10021002
╭─[exhaustive_deps.tsx:7:15]
@@ -1005,7 +1005,7 @@ source: crates/oxc_linter/src/tester.rs
10051005
· ────────────
10061006
8 │ }
10071007
╰────
1008-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1008+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
10091009
10101010
eslint-plugin-react-hooks(exhaustive-deps): React Hook useCallback has an unnecessary dependency: ref2.
10111011
╭─[exhaustive_deps.tsx:7:29]
@@ -1014,7 +1014,7 @@ source: crates/oxc_linter/src/tester.rs
10141014
· ────────────
10151015
8 │ }
10161016
╰────
1017-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1017+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
10181018
10191019
eslint-plugin-react(exhaustive-deps): React Hook useCallback has unnecessary dependency: activeTab
10201020
╭─[exhaustive_deps.tsx:7:14]
@@ -1032,7 +1032,7 @@ source: crates/oxc_linter/src/tester.rs
10321032
· ───────────
10331033
6 │ }
10341034
╰────
1035-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1035+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
10361036
10371037
eslint-plugin-react-hooks(exhaustive-deps): React Hook useImperativeHandle has a missing dependency: 'props.hello'
10381038
╭─[exhaustive_deps.tsx:6:15]
@@ -1221,7 +1221,7 @@ source: crates/oxc_linter/src/tester.rs
12211221
· ──────
12221222
5 │ }
12231223
╰────
1224-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1224+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12251225
12261226
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: MutableStore.
12271227
╭─[exhaustive_deps.tsx:5:15]
@@ -1230,7 +1230,7 @@ source: crates/oxc_linter/src/tester.rs
12301230
· ──────────────────
12311231
6 │ }
12321232
╰────
1233-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1233+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12341234
12351235
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: MutableStore.
12361236
╭─[exhaustive_deps.tsx:10:17]
@@ -1239,7 +1239,7 @@ source: crates/oxc_linter/src/tester.rs
12391239
· ────────────────────────
12401240
11 │ }
12411241
╰────
1242-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1242+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12431243
12441244
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: z.
12451245
╭─[exhaustive_deps.tsx:10:60]
@@ -1248,7 +1248,7 @@ source: crates/oxc_linter/src/tester.rs
12481248
· ─
12491249
11 │ }
12501250
╰────
1251-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1251+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12521252
12531253
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: global.
12541254
╭─[exhaustive_deps.tsx:10:63]
@@ -1257,7 +1257,7 @@ source: crates/oxc_linter/src/tester.rs
12571257
· ────────────
12581258
11 │ }
12591259
╰────
1260-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1260+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12611261
12621262
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has a dependency array that changes every render.
12631263
╭─[exhaustive_deps.tsx:10:16]
@@ -1275,7 +1275,7 @@ source: crates/oxc_linter/src/tester.rs
12751275
· ────────────────────────
12761276
11 │ }
12771277
╰────
1278-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1278+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12791279
12801280
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: z.
12811281
╭─[exhaustive_deps.tsx:10:60]
@@ -1284,7 +1284,7 @@ source: crates/oxc_linter/src/tester.rs
12841284
· ─
12851285
11 │ }
12861286
╰────
1287-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1287+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12881288
12891289
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has an unnecessary dependency: global.
12901290
╭─[exhaustive_deps.tsx:10:63]
@@ -1293,7 +1293,7 @@ source: crates/oxc_linter/src/tester.rs
12931293
· ────────────
12941294
11 │ }
12951295
╰────
1296-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1296+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
12971297
12981298
eslint-plugin-react-hooks(exhaustive-deps): React Hook useEffect has a dependency array that changes every render.
12991299
╭─[exhaustive_deps.tsx:10:16]
@@ -1311,7 +1311,7 @@ source: crates/oxc_linter/src/tester.rs
13111311
· ────────────────────────
13121312
11 │ }
13131313
╰────
1314-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1314+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
13151315
13161316
eslint-plugin-react-hooks(exhaustive-deps): React Hook useCallback has an unnecessary dependency: z.
13171317
╭─[exhaustive_deps.tsx:10:60]
@@ -1320,7 +1320,7 @@ source: crates/oxc_linter/src/tester.rs
13201320
· ─
13211321
11 │ }
13221322
╰────
1323-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1323+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
13241324
13251325
eslint-plugin-react-hooks(exhaustive-deps): React Hook useCallback has an unnecessary dependency: global.
13261326
╭─[exhaustive_deps.tsx:10:63]
@@ -1329,7 +1329,7 @@ source: crates/oxc_linter/src/tester.rs
13291329
· ────────────
13301330
11 │ }
13311331
╰────
1332-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1332+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
13331333
13341334
eslint-plugin-react(exhaustive-deps): React Hook useCallback has unnecessary dependency: MutableStore.hello.world
13351335
╭─[exhaustive_deps.tsx:10:16]
@@ -1401,7 +1401,7 @@ source: crates/oxc_linter/src/tester.rs
14011401
· ──────────────────────────
14021402
11 │ }
14031403
╰────
1404-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1404+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
14051405
14061406
eslint-plugin-react-hooks(exhaustive-deps): React Hook useCallback has an unnecessary dependency: z.
14071407
╭─[exhaustive_deps.tsx:10:62]
@@ -1410,7 +1410,7 @@ source: crates/oxc_linter/src/tester.rs
14101410
· ─
14111411
11 │ }
14121412
╰────
1413-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1413+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
14141414
14151415
eslint-plugin-react-hooks(exhaustive-deps): React Hook useCallback has an unnecessary dependency: global.
14161416
╭─[exhaustive_deps.tsx:10:65]
@@ -1419,7 +1419,7 @@ source: crates/oxc_linter/src/tester.rs
14191419
· ─────────────
14201420
11 │ }
14211421
╰────
1422-
help: Consider removing it from the dependency array. Outer scope values like aren't valid dependencies because mutating them doesn't re-render the component.
1422+
help: Consider removing it from the dependency array. Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
14231423
14241424
eslint-plugin-react(exhaustive-deps): React Hook useCallback has unnecessary dependency: MutableStore.hello.world
14251425
╭─[exhaustive_deps.tsx:10:16]

0 commit comments

Comments
 (0)