Skip to content

Commit e6291a1

Browse files
committed
Eslint 9 and fix lint
1 parent ee4d6f4 commit e6291a1

File tree

7 files changed

+8
-58
lines changed

7 files changed

+8
-58
lines changed

.eslintignore

Lines changed: 0 additions & 25 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import toruslabsTypescript from "@toruslabs/eslint-config-typescript";
2+
3+
export default [...toruslabsTypescript];

src/core/PopupHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class PopupHandler extends (EventEmitter as new () => TypedEmitter<PopupHandlerE
5252
sessionServerUrl?: string;
5353
}) {
5454
// Disabling the rule here, as it is a false positive.
55-
// eslint-disable-next-line constructor-super
55+
5656
super();
5757
this.url = url;
5858
this.target = target || "_blank";

src/jrpc/errors/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function isPlainObject(value: unknown) {
5252
proto = Object.getPrototypeOf(proto);
5353
}
5454
return Object.getPrototypeOf(value) === proto;
55-
} catch (_) {
55+
} catch {
5656
return false;
5757
}
5858
}
@@ -126,7 +126,7 @@ function isValidJson(str: unknown): boolean {
126126
}
127127
);
128128
// this means, it's a valid json so far
129-
} catch (e) {
129+
} catch {
130130
return false;
131131
}
132132
return true;

src/jrpc/mux.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class ObjectMultiplex extends Duplex {
4444
this._substreams[name] = substream;
4545

4646
// listen for parent stream to end
47-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
47+
4848
anyStreamEnd(this, (_error?: Error | null) => substream.destroy(_error || undefined));
4949

5050
return substream;

src/utils/browserStorage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class BrowserStorage {
3030
if (!storage.getItem(storeKey)) {
3131
this.resetStore();
3232
}
33-
} catch (error) {
33+
} catch {
3434
// Storage is not available
3535
}
3636
}

0 commit comments

Comments
 (0)