mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-10-20 18:56:30 +00:00
Move to @pezkuwi/dev 0.86.4 (eslint 10 toolchain)
- dev ^0.86.4 at the root and in packages/apps; directives renamed by pezkuwi-dev-migrate-eslint10. - eslint --fix with the 0.86.4 config; one fix broke syntax (typescript-eslint prefer-optional-chain turned `(isStarted && onStart) && onStart()` into `(isStarted && onStart?.();` in TxButton) and is corrected by hand. - The remaining findings fixed rather than disabled: optional chains (each suggestion reviewed), `cause` on rethrown errors, `if` instead of `a && promise` in effects, parallel instead of sequential awaits in Promise.all, Error rejections, no `delete` on arrays (the storage query cache is a Map; an upload's file list no longer keeps a hole), no `[object Object]` stringification (TFunction's second argument is text or options), dead code removed (referenda's never-shown expand button, react-query's unused CoreDescriptor).
This commit is contained in:
1 parent
c800e9affb
commit
45d479d2ec
325 files changed
+2942
-3531
No files matched your search
@@ -40,8 +40,8 @@ function Filters ({ data, onFilter }: Props): React.ReactElement<Props> {
|
||||
const coreArr: number[] = useMemo(() =>
|
||||
data?.length
|
||||
? Array.from({ length: data.length || 0 }, (_, index) => index)
|
||||
: []
|
||||
, [data]);
|
||||
: [],
|
||||
[data]);
|
||||
|
||||
const { t } = useTranslation();
|
||||
const teyrchainId = useDebounce(_teyrchainId);
|
||||
|
||||
@@ -19,7 +19,7 @@ function RegionLength ({ children, className }: Props): React.ReactElement<Props
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
{length?.toString() || '-'}
|
||||
{typeof length === 'number' ? length : '-'}
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -34,8 +34,8 @@ function Workload ({ api, config, core, workload, workplan }: Props): React.Reac
|
||||
const { currentRegion, status } = useBrokerContext();
|
||||
|
||||
const currentTimeSlice = useMemo(() =>
|
||||
status?.lastTimeslice ?? 0
|
||||
, [status]);
|
||||
status?.lastTimeslice ?? 0,
|
||||
[status]);
|
||||
|
||||
const regionInfo = useRegions(api);
|
||||
const regionOwnerInfo: RegionInfo | undefined = useMemo(() => regionInfo?.find((v) => v.core === core && v.start <= currentTimeSlice && v.end > currentTimeSlice), [regionInfo, core, currentTimeSlice]);
|
||||
|
||||
@@ -18,8 +18,8 @@ interface Props {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
type LeaseMapType = Record<number, LegacyLease>
|
||||
type ReservationMapType = Record<number, Reservation>
|
||||
type LeaseMapType = Record<number, LegacyLease>;
|
||||
type ReservationMapType = Record<number, Reservation>;
|
||||
|
||||
const formatDataObject = (one: CoreWorkplan | CoreWorkload, leaseMap: LeaseMapType, reservationMap: ReservationMapType) => ({
|
||||
...one,
|
||||
|
||||
Reference in new issue
Block a user