mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-11-20 21:16:10 +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
@@ -30,7 +30,7 @@ export function createAugmentedApi (): ApiPromise {
|
||||
signedExtensions: PEZKUWI_SIGNED_EXTENSIONS
|
||||
});
|
||||
|
||||
// eslint-disable-next-line deprecation/deprecation
|
||||
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
||||
api.injectMetadata(metadata, true);
|
||||
|
||||
return api;
|
||||
|
||||
@@ -11,7 +11,6 @@ export function makeStakingLedger (active: BN | number | string): any {
|
||||
// so we fill out just the fields that are definitely required,
|
||||
// and hope that nothing more is required.
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
return {
|
||||
active: reg.createType('Compact<Balance>', reg.createType('Balance', new BN(active)))
|
||||
} as any;
|
||||
|
||||
@@ -37,8 +37,7 @@ jest.mock('@pezkuwi/react-hooks/useAccounts', () => ({
|
||||
}));
|
||||
|
||||
jest.mock('@pezkuwi/react-hooks/useAccountInfo', () => {
|
||||
// eslint-disable-next-line func-call-spacing
|
||||
const actual = jest.requireActual<{useAccountInfo: (address: string) => UseAccountInfo}>('@pezkuwi/react-hooks/useAccountInfo');
|
||||
const actual = jest.requireActual<{ useAccountInfo: (address: string) => UseAccountInfo }>('@pezkuwi/react-hooks/useAccountInfo');
|
||||
|
||||
return ({
|
||||
useAccountInfo: (address: string) => {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
// Copyright 2017-2026 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type React from 'react';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
import { useApi } from '@pezkuwi/react-hooks';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents
|
||||
export const WaitForApi = ({ children }: { children: React.ReactNode }): PropsWithChildren<any> | null => {
|
||||
const api = useApi();
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { KeyringJson$Meta } from '@pezkuwi/ui-keyring/types';
|
||||
|
||||
export type Override<T> = {
|
||||
[P in keyof T]?: T[P];
|
||||
}
|
||||
};
|
||||
|
||||
export interface AccountOverrides {
|
||||
meta?: Override<KeyringJson$Meta>;
|
||||
|
||||
@@ -21,7 +21,7 @@ export type AccountsMap = Record<string, Account>;
|
||||
|
||||
export type Override<T> = {
|
||||
[P in keyof T]?: T[P];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Test inputs structure
|
||||
|
||||
Reference in new issue
Block a user