Skip to content

Commit

Permalink
Eslint 9 and fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hieu-w committed Feb 9, 2025
1 parent ee4d6f4 commit e6291a1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 58 deletions.
25 changes: 0 additions & 25 deletions .eslintignore

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import toruslabsTypescript from "@toruslabs/eslint-config-typescript";

export default [...toruslabsTypescript];
2 changes: 1 addition & 1 deletion src/core/PopupHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PopupHandler extends (EventEmitter as new () => TypedEmitter<PopupHandlerE
sessionServerUrl?: string;
}) {
// Disabling the rule here, as it is a false positive.
// eslint-disable-next-line constructor-super

super();
this.url = url;
this.target = target || "_blank";
Expand Down
4 changes: 2 additions & 2 deletions src/jrpc/errors/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function isPlainObject(value: unknown) {
proto = Object.getPrototypeOf(proto);
}
return Object.getPrototypeOf(value) === proto;
} catch (_) {
} catch {
return false;
}
}
Expand Down Expand Up @@ -126,7 +126,7 @@ function isValidJson(str: unknown): boolean {
}
);
// this means, it's a valid json so far
} catch (e) {
} catch {
return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/jrpc/mux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class ObjectMultiplex extends Duplex {
this._substreams[name] = substream;

// listen for parent stream to end
// eslint-disable-next-line @typescript-eslint/no-use-before-define

anyStreamEnd(this, (_error?: Error | null) => substream.destroy(_error || undefined));

return substream;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/browserStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class BrowserStorage {
if (!storage.getItem(storeKey)) {
this.resetStore();
}
} catch (error) {
} catch {
// Storage is not available
}
}
Expand Down

0 comments on commit e6291a1

Please sign in to comment.