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

+9 -6
View File
@@ -30,7 +30,7 @@ interface CacheInstance {
refresh: (swallowErrors: boolean) => React.ComponentType<any>;
}
const cache: CacheInstance[] = [];
const cache = new Map<number, CacheInstance>();
function keyToName (isConst: boolean, _key: Uint8Array | QueryableStorageEntry<'promise'> | ConstValue): string {
if (isConst) {
@@ -83,7 +83,9 @@ function createComponent (type: string, Component: React.ComponentType<any>, def
function getCachedComponent (registry: Registry, query: QueryTypes): CacheInstance {
const { blockHash, id, isConst, key, params = [] } = query as StorageModuleQuery;
if (!cache[id]) {
let instance = cache.get(id);
if (!instance) {
let renderHelper;
let type: string;
@@ -116,7 +118,7 @@ function getCachedComponent (registry: Registry, query: QueryTypes): CacheInstan
params: isEntries
? [key.entries, ...values]
: blockHash
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
? [key.at, blockHash, ...values]
: [key, ...values],
withIndicator: true
@@ -135,10 +137,11 @@ function getCachedComponent (registry: Registry, query: QueryTypes): CacheInstan
defaultProps
);
cache[query.id] = createComponent(type, Component, defaultProps, renderHelper);
instance = createComponent(type, Component, defaultProps, renderHelper);
cache.set(id, instance);
}
return cache[id];
return instance;
}
function Query ({ className = '', onRemove, value }: Props): React.ReactElement<Props> | null {
@@ -158,7 +161,7 @@ function Query ({ className = '', onRemove, value }: Props): React.ReactElement<
const _onRemove = useCallback(
(): void => {
delete cache[value.id];
cache.delete(value.id);
onRemove(value.id);
},