fix(screener): silence ESLint no-empty / no-undef in canvas helpers
빈 catch 블록 3곳에 의도 주석 추가, test-setup.js 의 beforeEach 명시적 import. 우리 신규 코드의 lint error 0으로 정리. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,14 +31,14 @@ export function useCanvasLayout(initialPositions) {
|
||||
const updateNodePosition = useCallback((nodeId, pos) => {
|
||||
setPositions((prev) => {
|
||||
const next = { ...prev, [nodeId]: { x: pos.x, y: pos.y } };
|
||||
try { localStorage.setItem(STORAGE_KEY, JSON.stringify(next)); } catch {}
|
||||
try { localStorage.setItem(STORAGE_KEY, JSON.stringify(next)); } catch { /* ignore quota/security errors */ }
|
||||
return next;
|
||||
});
|
||||
}, []);
|
||||
|
||||
const reset = useCallback(() => {
|
||||
setPositions(initialPositions);
|
||||
try { localStorage.removeItem(STORAGE_KEY); } catch {}
|
||||
try { localStorage.removeItem(STORAGE_KEY); } catch { /* ignore security errors */ }
|
||||
}, [initialPositions]);
|
||||
|
||||
return { positions, updateNodePosition, reset };
|
||||
|
||||
@@ -18,7 +18,7 @@ export function useScreenerMode() {
|
||||
const setMode = (m) => {
|
||||
if (!VALID_MODES.has(m)) return;
|
||||
setModeState(m);
|
||||
try { localStorage.setItem(STORAGE_KEY, m); } catch {}
|
||||
try { localStorage.setItem(STORAGE_KEY, m); } catch { /* ignore quota/security errors */ }
|
||||
};
|
||||
|
||||
return { mode, setMode };
|
||||
|
||||
Reference in New Issue
Block a user