-
-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(analyze/js): fix some imports not being detected
- Loading branch information
Showing
5 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/issue4568.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type {Point} fom '.geomet'; | ||
import {useEffect, seRef} 'react'; | ||
|
||
xpor function ueCanvasn( | ||
) { | ||
useEffect( => {on late Point},[c |
37 changes: 37 additions & 0 deletions
37
crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/issue4568.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
source: crates/biome_js_analyze/tests/spec_tests.rs | ||
expression: issue4568.js | ||
--- | ||
# Input | ||
```jsx | ||
import type {Point} fom '.geomet'; | ||
import {useEffect, seRef} 'react'; | ||
|
||
xpor function ueCanvasn( | ||
) { | ||
useEffect( => {on late Point},[c | ||
|
||
``` | ||
# Diagnostics | ||
``` | ||
issue4568.js:6:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
! This hook specifies more dependencies than necessary: c | ||
|
||
4 │ xpor function ueCanvasn( | ||
5 │ ) { | ||
> 6 │ useEffect( => {on late Point},[c | ||
│ ^^^^^^^^^ | ||
7 │ | ||
|
||
i This dependency can be removed from the list. | ||
|
||
4 │ xpor function ueCanvasn( | ||
5 │ ) { | ||
> 6 │ useEffect( => {on late Point},[c | ||
│ ^ | ||
7 │ | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters