mirror of
https://github.com/pezkuwichain/pezkuwi-extension.git
synced 2026-11-08 01:21:06 +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
@@ -29,36 +29,21 @@ const messagingFake = new MessagingFake();
|
||||
chrome.runtime.connect.returns(messagingFake);
|
||||
|
||||
chrome.storage.local.get.returns(
|
||||
new Promise<Record<string, any>>((resolve, reject) => {
|
||||
try {
|
||||
const result = {
|
||||
authUrls: JSON.stringify({
|
||||
'http://localhost:3000': {
|
||||
authorizedAccounts: ['5FbSap4BsWfjyRhCchoVdZHkDnmDm3NEgLZ25mesq4aw2WvX'],
|
||||
count: 0,
|
||||
id: '11',
|
||||
origin: 'example.com',
|
||||
url: 'http://localhost:3000'
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
resolve(result);
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
Promise.resolve<Record<string, any>>({
|
||||
authUrls: JSON.stringify({
|
||||
'http://localhost:3000': {
|
||||
authorizedAccounts: ['5FbSap4BsWfjyRhCchoVdZHkDnmDm3NEgLZ25mesq4aw2WvX'],
|
||||
count: 0,
|
||||
id: '11',
|
||||
origin: 'example.com',
|
||||
url: 'http://localhost:3000'
|
||||
}
|
||||
})
|
||||
}));
|
||||
|
||||
chrome.storage.local.set.returns(
|
||||
new Promise<void>((resolve, reject) => {
|
||||
try {
|
||||
resolve();
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
}));
|
||||
chrome.storage.local.set.returns(Promise.resolve());
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
(window as any).chrome = (globalThis as any).chrome = chrome;
|
||||
|
||||
export default chrome;
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2019-2026 @pezkuwi/extension-mocks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// eslint-disable-line
|
||||
module.exports = '';
|
||||
Reference in new issue
Block a user