Skip to content
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

Closed
wants to merge 13 commits into from
Closed

refactor(misskey-js): 警告をすべて解決 #14257

wants to merge 13 commits into from

Conversation

KisaragiEffective
Copy link
Collaborator

@KisaragiEffective KisaragiEffective commented Jul 18, 2024

What

close #14253

Why

issueに記載のため省略

Additional info (optional)

オセロゲームのeslint-disable-next-line @typescript-eslint/no-explicit-anyはフロントエンドの解析が必要なのでこのPRでは取り組まない

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 42.00%. Comparing base (efb0429) to head (2276076).

Files Patch % Lines
packages/misskey-js/src/streaming.ts 93.75% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14257      +/-   ##
===========================================
- Coverage    42.07%   42.00%   -0.07%     
===========================================
  Files         1527     1527              
  Lines       195068   195074       +6     
  Branches      2688     3576     +888     
===========================================
- Hits         82079    81948     -131     
- Misses      112448   112555     +107     
- Partials       541      571      +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KisaragiEffective
Copy link
Collaborator Author

ModerationLogPayLoadanyを潰したほうが筋が良さそう

@KisaragiEffective KisaragiEffective marked this pull request as draft July 18, 2024 11:56
@@ -14,6 +14,7 @@ export type APIError = {
code: string;
message: string;
kind: 'client' | 'server';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

潰すと多分広範囲に影響するので後のPRでやる

@@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

@@ -49,6 +51,7 @@ export class APIClient {
this.fetch = opts.fetch ?? ((...args) => fetch(...args));
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

@KisaragiEffective KisaragiEffective changed the title chore(misskey-js): Unchanged files with check annotationsで紛らわしい部分の警告を抑制 refactor(misskey-js): 警告をすべて解決 Jul 18, 2024
@KisaragiEffective KisaragiEffective marked this pull request as ready for review July 18, 2024 13:03
@KisaragiEffective
Copy link
Collaborator Author

ready for review

…reverted after the check)"

This reverts commit 67072e3.
@KisaragiEffective
Copy link
Collaborator Author

~/WebstormProjects/misskey$ pnpm --filter misskey-js lint

> [email protected] lint /home/kisaragi/WebstormProjects/misskey/packages/misskey-js
> pnpm typecheck && pnpm eslint


> [email protected] typecheck /home/kisaragi/WebstormProjects/misskey/packages/misskey-js
> tsc --noEmit


> [email protected] eslint /home/kisaragi/WebstormProjects/misskey/packages/misskey-js
> eslint './**/*.{js,jsx,ts,tsx}'

(node:700498) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
~/WebstormProjects/misskey$ 

🎉

Comment on lines +7 to 8
// eslint-disable-next-line no-param-reassign
if (acct.startsWith('@')) acct = acct.substring(1);
Copy link
Contributor

@tai-cha tai-cha Jul 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは素直にコメントで抑制するのではなく引数に上書きせずに再宣言した方がいいタイプな気がする

Copy link
Member

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自体の有用性に疑問を持ってます...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

既存の振る舞いを壊さないようにASTを変えない範囲で解決したので、別のPRに分けたい気持ちがややある

packages/misskey-js/etc/misskey-js.api.md Show resolved Hide resolved
@kakkokari-gtyih
Copy link
Contributor

オセロゲームのeslint-disable-next-line @typescript-eslint/no-explicit-anyはフロントエンドの解析が必要なのでこのPRでは取り組まない

やるか

@kakkokari-gtyih
Copy link
Contributor

やった

@KisaragiEffective KisaragiEffective deleted the chore/misskey-js/suppress-some-warnings branch July 20, 2024 09:17
@syuilo
Copy link
Member

syuilo commented Jul 20, 2024

あれこれcloseされたのなぜかしら

@Sayamame-beans
Copy link
Member

復旧しました: #14277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

misskey-jsの警告全部潰す
6 participants