fix(core): update and fix oxlint error (#13591)

#### PR Dependency Tree


* **PR #13591** 👈
  * **PR #13590**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- Bug Fixes
- Improved drag-and-drop stability: draggables, drop targets, and
monitors now respond when option sources or external data change.
- Improved async actions and permission checks to always use the latest
callbacks and error handlers.

- Chores
  - Lint/Prettier configs updated to ignore the Git directory.
  - Upgraded oxlint dev dependency.

- Tests
- Updated several end-to-end tests for more reliable text selection,
focus handling, and timing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
L-Sun
2025-09-16 16:47:43 +08:00
committed by GitHub
parent 039976ee6d
commit fd717af3db
11 changed files with 61 additions and 142 deletions

View File

@@ -14,12 +14,16 @@ export const useGuard = <
) => {
const guardService = useService(GuardService);
useEffect(() => {
// oxlint-disable-next-line exhaustive-deps
guardService.revalidateCan(action, ...args);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [action, guardService, ...args]);
const livedata$ = useMemo(
() => guardService.can$(action, ...args),
() => {
// oxlint-disable-next-line exhaustive-deps
return guardService.can$(action, ...args);
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[action, guardService, ...args]
);

View File

@@ -24,6 +24,6 @@ export function useAsyncCallback<T extends any[]>(
(...args: any) => {
callback(...args).catch(e => handleAsyncError(e));
},
[...deps] // eslint-disable-line react-hooks/exhaustive-deps
[callback, handleAsyncError, ...deps] // eslint-disable-line react-hooks/exhaustive-deps
);
}