Skip to content

Commit ee38135

Browse files
committed
fixed snapshot tests
1 parent ca1a1e9 commit ee38135

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ declare_lint_rule! {
356356
/// ```
357357
///
358358
/// ```jsx,use_options
359+
/// import { useEffect } from "react";
360+
///
359361
/// function Foo() {
360362
/// let stateVar = 1;
361363
/// // not used but still OK
@@ -383,7 +385,7 @@ declare_lint_rule! {
383385
/// ```jsx,expect_diagnostic,use_options
384386
/// function noArrayYesProblem() {
385387
/// let stateVar = 1;
386-
/// useEffect(() => {});
388+
/// React.useEffect(() => {});
387389
/// }
388390
/// ```
389391
///

crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.ts.snap

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ customHook.ts:20:8 lint/correctness/useExhaustiveDependencies ━━━━━━
131131
22 │ useMyEffect(() => {
132132
133133
i Biome can't statically verify whether you've passed the correct dependencies.
134-
135-
i Replace with an array literal and list your dependencies within it.
134+
Replace the argument with an array literal and list your dependencies within it.
136135
137136
138137
```
@@ -150,8 +149,7 @@ customHook.ts:34:20 lint/correctness/useExhaustiveDependencies ━━━━━
150149
36});
151150
152151
i Biome can't statically verify whether you've passed the correct dependencies.
153-
154-
i Replace with an array literal and list your dependencies within it.
152+
Replace the argument with an array literal and list your dependencies within it.
155153
156154
157155
```
@@ -172,8 +170,7 @@ customHook.ts:38:20 lint/correctness/useExhaustiveDependencies ━━━━━
172170
42 │
173171
174172
i Biome can't statically verify whether you've passed the correct dependencies.
175-
176-
i Replace with an array literal and list your dependencies within it.
173+
Replace the argument with an array literal and list your dependencies within it.
177174
178175
179176
```
@@ -287,8 +284,7 @@ customHook.ts:50:39 lint/correctness/useExhaustiveDependencies ━━━━━
287284
52 │ });
288285
289286
i Biome can't statically verify whether you've passed the correct dependencies.
290-
291-
i Replace with an array literal and list your dependencies within it.
287+
Replace the argument with an array literal and list your dependencies within it.
292288
293289
294290
```
@@ -470,8 +466,7 @@ customHook.ts:67:17 lint/correctness/useExhaustiveDependencies ━━━━━
470466
69 │ });
471467
472468
i Biome can't statically verify whether you've passed the correct dependencies.
473-
474-
i Replace with an array literal and list your dependencies within it.
469+
Replace the argument with an array literal and list your dependencies within it.
475470
476471
477472
```
@@ -524,8 +519,7 @@ customHook.ts:74:17 lint/correctness/useExhaustiveDependencies ━━━━━
524519
78 │
525520
526521
i Biome can't statically verify whether you've passed the correct dependencies.
527-
528-
i Replace with an array literal and list your dependencies within it.
522+
Replace the argument with an array literal and list your dependencies within it.
529523
530524
531525
```

crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/nonLiteralDependenciesArray.js.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ nonLiteralDependenciesArray.js:9:5 lint/correctness/useExhaustiveDependencies
3131
11 │
3232
3333
i Biome can't statically verify whether you've passed the correct dependencies.
34-
35-
i Replace with an array literal and list your dependencies within it.
34+
Replace the argument with an array literal and list your dependencies within it.
3635
3736
3837
```

0 commit comments

Comments
 (0)