chore: suit eslint rules

This commit is contained in:
Ali BARIN
2022-01-16 19:47:16 +01:00
parent f6d7971b4f
commit c09a535653
73 changed files with 1197 additions and 2549 deletions

View File

@@ -1,5 +1,4 @@
import { URLSearchParams } from 'url';
import DiscordApi from 'discord.js';
import axios, { AxiosInstance } from 'axios';
import App from '../../models/app';
import Field from '../../types/field';

View File

@@ -1,4 +1,4 @@
import { google, google as GoogleApi } from 'googleapis';
import { google as GoogleApi } from 'googleapis';
import App from '../../models/app';
import Field from '../../types/field';

View File

@@ -16,11 +16,11 @@ export default class Authentication {
this.appData = App.findOneByKey('github');
}
get oauthRedirectUrl() {
get oauthRedirectUrl(): string {
return this.appData.fields.find((field: Field) => field.key == 'oAuthRedirectUrl').value;
}
async createAuthData() {
async createAuthData(): { url: string } {
const { url } = await getWebFlowAuthorizationUrl({
clientType: "oauth-app",
clientId: this.connectionData.consumerKey,
@@ -33,8 +33,8 @@ export default class Authentication {
};
}
async verifyCredentials() {
const { data, authentication } = await exchangeWebFlowCode({
async verifyCredentials(): any {
const { data } = await exchangeWebFlowCode({
clientType: "oauth-app",
clientId: this.connectionData.consumerKey,
clientSecret: this.connectionData.consumerSecret,
@@ -65,7 +65,7 @@ export default class Authentication {
});
}
async isStillVerified() {
async isStillVerified(): boolean {
try {
await this.getTokenInfo();

View File

@@ -1,4 +1,4 @@
import TwitchApi, { ApiVersions } from 'twitch-js';
import TwitchApi from 'twitch-js';
import fetchUtil from 'twitch-js/lib/utils/fetch';
import App from '../../models/app';
import Field from '../../types/field';