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:
Satoshi Qazi Muhammed authored and SatoshiQaziMuhammed committed 2026-10-10 02:06:12 +04:00
1 parent c800e9affb
commit 45d479d2ec
325 files changed
+2942 -3531

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ function GroupDisplay ({ affinities, apiUrl, children, className = '', favoriteC
[index, isSelected, setGroup]
);
const isFavoriteHeader = useMemo(() => header?.toString().includes('Favorite'), [header]);
const isFavoriteHeader = useMemo(() => typeof header === 'string' && header.includes('Favorite'), [header]);
const filtered = useMemo(
() => networks.filter(({ isUnreachable }) => !isUnreachable),
+3 -3
View File
@@ -63,9 +63,9 @@ function combineEndpoints (endpoints: LinkOption[]): Group[] {
const prov = { isLightClient: e.isLightClient, name: e.textBy, url: e.value };
const isFavorite = isFavoriteChain(favoriteChains,
{ chainName: e.text?.toString() ?? '',
{ chainName: typeof e.text === 'string' ? e.text : '',
paraId: e.paraId,
relay: e.textRelay?.toString() });
relay: typeof e.textRelay === 'string' ? e.textRelay : undefined });
if (isFavorite && favoriteGroupIndex !== -1 && !e.isUnreachable) {
const favGroup = result[favoriteGroupIndex];
@@ -106,7 +106,7 @@ function combineEndpoints (endpoints: LinkOption[]): Group[] {
// Swap first two items in `networks` if first item is relay chain
combinedEndpoints.forEach((r) => {
if (r.networks.length >= 2 && r.networks[0].isRelay && r.header?.toString().includes('teyrchains')) {
if (r.networks.length >= 2 && r.networks[0].isRelay && typeof r.header === 'string' && r.header.includes('teyrchains')) {
[r.networks[0], r.networks[1]] = [r.networks[1], r.networks[0]];
}
});
+1 -1
View File
@@ -9,7 +9,7 @@ export interface IFavoriteChainProps {
paraId?: number;
}
export type IFavoriteChainsStorage = Record<string, {relay: string, paraId: number}[]>
export type IFavoriteChainsStorage = Record<string, { relay: string, paraId: number }[]>;
export interface Network {
isChild?: boolean;
+1 -1
View File
@@ -6,7 +6,7 @@ import type { IFavoriteChainProps, IFavoriteChainsStorage } from './types.js';
import { createWsEndpoints } from '@pezkuwi/apps-config';
export const FAVORITE_CHAINS_KEY = 'pezkuwi-app-favorite-chains';
const chainsConfig = createWsEndpoints((k, v) => v?.toString() || k);
const chainsConfig = createWsEndpoints((k, v) => (typeof v === 'string' && v) || k);
export const toggleFavoriteChain = (
chainInfo: IFavoriteChainProps