File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2500,7 +2500,7 @@ fn test() {
25002500 const local1 = {};
25012501 console.log(local1);
25022502 }, [local1]);
2503- }` " ,
2503+ }" ,
25042504 r"function MyComponent() {
25052505 const local1 = {};
25062506 useCallback(() => {}, [local1]);
Original file line number Diff line number Diff line change @@ -694,12 +694,14 @@ source: crates/oxc_linter/src/tester.rs
694694 ╰────
695695 help : Try memoizing this variable with ` useRef` or ` useCallback` .
696696
697- × Unterminated string
698- ╭─[exhaustive_deps .tsx :7 :10 ]
697+ ⚠ eslint - plugin - react - hooks (exhaustive - deps ): React Hook useCallback has a dependency array that changes every render .
698+ ╭─[exhaustive_deps .tsx :6 :14 ]
699+ 5 │ console .log (local1 );
699700 6 │ }, [local1 ]);
700- 7 │ } `
701- · ─
701+ · ────────
702+ 7 │ }
702703 ╰────
704+ help : Try memoizing this variable with ` useRef` or ` useCallback` .
703705
704706 ⚠ eslint - plugin - react (exhaustive - deps ): React Hook useCallback has unnecessary dependency : local1
705707 ╭─[exhaustive_deps .tsx :3 :33 ]
You can’t perform that action at this time.
0 commit comments