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): warnを除去 #14520

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/misskey-js/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@
): Promise<SwitchCaseResponseType<E, P>> {
return new Promise((resolve, reject) => {
let mediaType = 'application/json';
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition (autogenがバグったときのため、念の為nullチェックも行う)

Check failure on line 70 in packages/misskey-js/src/api.ts

View workflow job for this annotation

GitHub Actions / lint (misskey-js)

Definition for rule '@typescript-eslint/no-unnecessary-condition (autogenがバグったときのため、念の為nullチェックも行う)' was not found
if (this.assertSpecialEpReqType(endpoint) && endpointReqTypes[endpoint] != null) {

Check warning on line 71 in packages/misskey-js/src/api.ts

View workflow job for this annotation

GitHub Actions / lint (misskey-js)

Unnecessary conditional, both sides of the expression are literal values
mediaType = endpointReqTypes[endpoint];
}

let payload: FormData | string = '{}';

if (mediaType === 'application/json') {
Expand Down
Loading