mirror of
https://github.com/pezkuwichain/pezkuwi-extension.git
synced 2026-12-02 02:17:11 +00:00
Move to @pezkuwi/dev 0.86 (eslint 10 toolchain)
- @pezkuwi/dev, dev-test, dev-ts ^0.86.3 in the root and in every workspace package (they still asked for 0.84.3) - tsconfig.base target ES2022, the @pezkuwi/dev default; it carries the ErrorOptions type for `cause` - rethrown errors carry the original as `cause`; rejections are normalised to Error - page/messaging: the typed subscriber is called directly, not as `Function` - chrome mock: constant results through Promise.resolve - useLedger: drop a construction every branch below repeated - InputWithLabel: onKeyDown instead of the deprecated onKeyPress - Account: toggleActions + 1 instead of a pre-increment of a parameter - optional chains where a guard tested the same value - specs: mount<React.Component> so the wrappers are not `any`-typed - AccountsStore.set keeps its async override of KeyringStore.set: BaseStore.set handles its own failure, so it never rejects - extension-chains keeps its ChainProperties assertion: the package's own build does not load the type augmentation - the existing React Compiler findings (37, react-hooks rules only) are recorded in eslint-suppressions.json; a new one fails lint
This commit is contained in:
1 parent
0321454dc7
commit
9d769676e4
58 files changed
+2795
-3355
No files matched your search
@@ -3,7 +3,7 @@
|
||||
|
||||
// This is to ensure the legacy `class Ledger` doesn't throw linting errors.
|
||||
//
|
||||
/* eslint-disable deprecation/deprecation */
|
||||
/* eslint-disable @typescript-eslint/no-deprecated */
|
||||
|
||||
import type { Network } from '@pezkuwi/networks/types';
|
||||
import type { HexString } from '@pezkuwi/util/types';
|
||||
@@ -50,7 +50,7 @@ function getState (): StateBase {
|
||||
}
|
||||
|
||||
function retrieveLedger (genesis: string): LedgerGeneric | Ledger {
|
||||
let ledger: LedgerGeneric | Ledger | null = null;
|
||||
let ledger: LedgerGeneric | Ledger;
|
||||
|
||||
const currApp = settings.get().ledgerApp;
|
||||
|
||||
@@ -64,10 +64,6 @@ function retrieveLedger (genesis: string): LedgerGeneric | Ledger {
|
||||
|
||||
assert(def.slip44, 'Slip44 is not available for this network, please report an issue to update this chains slip44');
|
||||
|
||||
// All chains use the `slip44` from polkadot in their derivation path in ledger.
|
||||
// This interface is specific to the underlying PolkadotGenericApp.
|
||||
ledger = new LedgerGeneric('webusb', def.network, knownLedger['polkadot']);
|
||||
|
||||
if (currApp === 'generic') {
|
||||
// All chains use the `slip44` from polkadot in their derivation path in ledger.
|
||||
// This interface is specific to the underlying PolkadotGenericApp.
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { RefObject } from 'react';
|
||||
|
||||
import { useCallback, useEffect } from 'react';
|
||||
|
||||
export default function useOutsideClick (refs: RefObject<HTMLDivElement|null>[], callback: () => void): void {
|
||||
export default function useOutsideClick (refs: RefObject<HTMLDivElement | null>[], callback: () => void): void {
|
||||
const handleClick = useCallback((e: MouseEvent): void => {
|
||||
refs.every(({ current }) =>
|
||||
current &&
|
||||
|
||||
@@ -5,6 +5,6 @@ import { useContext } from 'react';
|
||||
|
||||
import { ToastContext } from '../components/contexts.js';
|
||||
|
||||
export default function useToast (): {show: (message: string) => void} {
|
||||
export default function useToast (): { show: (message: string) => void } {
|
||||
return useContext(ToastContext);
|
||||
}
|
||||
Reference in new issue
Block a user