-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TypeScript Lints #137
Fix TypeScript Lints #137
Conversation
@@ -88,6 +88,7 @@ const actionCalldata = (action: MetaTransaction): string => { | |||
} | |||
|
|||
export interface RpcProvider extends Provider { | |||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |||
send(method: string, params: unknown[]): Promise<any> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the interface of a JsonRpcProvider
in ethers
, so I just disabled the lint for the send
function.
Pull Request Test Coverage Report for Build 6787408863
💛 - Coveralls |
6ea24f2
to
8c4d4d9
Compare
@@ -98,6 +99,7 @@ export class MultiProvider4337 extends JsonRpcProvider { | |||
this.generalProvider = generalProvider | |||
} | |||
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any is just a warning, right? Is it necessary to turn it off, or keeping it as a "todo" list is better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I don't think it is a TODO
lint - as this is the function signature required by ethers
, so it will always be the any
and the lint is a false-positive.
That being said, I do agree with "keeping it as a "todo" list is better", so at least for the eslint-disable-next-line @typescript-eslint/no-non-null-assertion
it would make sense to keep the lint warning around...
@mmv08 can you take another look? I augmented the |
In general, it looks good to me. I don't know how reliable overwriting ethers' types is in case there are any breaking changes. But anyway, if there are any, they should be caught by tests. |
This PR just fixes some TypeScript lints. Additional comments included inline 👇.