disable bugged react-hooks rules

This commit is contained in:
jeffvli
2025-11-18 00:02:48 -08:00
parent bd5f2b8f68
commit 05deafdffb
4 changed files with 12 additions and 24 deletions
+2
View File
@@ -27,6 +27,8 @@ export default tseslint.config(
rules: {
...eslintPluginReactHooks.configs.recommended.rules,
...eslintPluginReactRefresh.configs.vite.rules,
'react-hooks/set-state-in-effect': 'off',
'react-hooks/refs': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-duplicate-enum-values': 'off',
'@typescript-eslint/no-explicit-any': 'off',
@@ -1249,9 +1249,7 @@ export const ItemTableList = ({
behavior: 'instant',
left: scrollLeft,
});
setTimeout(() => {
isScrolling.row = false;
}, 0);
isScrolling.row = false;
}
// Sync from main content to header and sticky columns
@@ -1282,11 +1280,9 @@ export const ItemTableList = ({
top: scrollTop,
});
}
setTimeout(() => {
isScrolling.header = false;
isScrolling.pinnedLeft = false;
isScrolling.pinnedRight = false;
}, 0);
isScrolling.header = false;
isScrolling.pinnedLeft = false;
isScrolling.pinnedRight = false;
}
// Sync vertical scroll between left pinned column and main content (only if pinnedLeft exists)
@@ -1296,9 +1292,7 @@ export const ItemTableList = ({
behavior: 'instant',
top: scrollTop,
});
setTimeout(() => {
isScrolling.row = false;
}, 0);
isScrolling.row = false;
}
// Sync vertical scroll between right pinned column and main content (only if pinnedRight exists)
@@ -1308,9 +1302,7 @@ export const ItemTableList = ({
behavior: 'instant',
top: scrollTop,
});
setTimeout(() => {
isScrolling.row = false;
}, 0);
isScrolling.row = false;
}
};
@@ -149,15 +149,11 @@ export const MpvPlayerEngine = (props: MpvPlayerEngineProps) => {
if (currentSrc) {
// Set current song at position 0 and next song at position 1
mpvPlayer.setQueue(currentSrc, nextSrc, playerStatus !== PlayerStatus.PLAYING);
setTimeout(() => {
setPreviousCurrentSrc(currentSrc);
}, 0);
setPreviousCurrentSrc(currentSrc);
} else {
// Clear queue if no current song
mpvPlayer.setQueue(undefined, undefined, true);
setTimeout(() => {
setPreviousCurrentSrc(undefined);
}, 0);
setPreviousCurrentSrc(undefined);
}
} else {
// If currentSrc hasn't changed but nextSrc has, update position 1
@@ -32,10 +32,8 @@ export const SearchInput = ({
() => {
if (enableHotkey) {
setIsInputMode(true);
setTimeout(() => {
ref?.current?.focus();
ref?.current?.select();
}, 0);
ref?.current?.focus();
ref?.current?.select();
}
},
],