-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactor(misskey-js): 警告をすべて解決 #14257
Changes from 4 commits
fad2ec5
67072e3
c22dd63
e31401c
b2bac0e
9faa073
8449c6e
4a00426
65405b9
a581426
b1c1e94
49c87ee
2276076
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ export type APIError = { | |
code: string; | ||
message: string; | ||
kind: 'client' | 'server'; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 潰すと多分広範囲に影響するので後のPRでやる |
||
info: Record<string, any>; | ||
}; | ||
|
||
|
@@ -29,6 +30,7 @@ export type FetchLike = (input: string, init?: { | |
headers: { [key in string]: string } | ||
}) => Promise<{ | ||
status: number; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
json(): Promise<any>; | ||
}>; | ||
|
||
|
@@ -49,6 +51,7 @@ export class APIClient { | |
this.fetch = opts.fetch ?? ((...args) => fetch(...args)); | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
private assertIsRecord<T>(obj: T): obj is T & Record<string, any> { | ||
return obj !== null && typeof obj === 'object' && !Array.isArray(obj); | ||
} | ||
|
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.
これは素直にコメントで抑制するのではなく引数に上書きせずに再宣言した方がいいタイプな気がする
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.
どうだろう...Strict modeだと arguments との影響もないしあるし正直私はno-param-reassign自体の有用性に疑問を持ってます...
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.
既存の振る舞いを壊さないようにASTを変えない範囲で解決したので、別のPRに分けたい気持ちがややある