mirror of
https://github.com/idanoo/autobrr
synced 2025-07-26 02:09:13 +00:00
refactor(web) add eslint (#222)
* fix(tsconfig.json): changed skipLibCheck to false. refactor(eslint): moved configuration from package.json to .eslintrc.js and added a typescript plugin for future use * feat: wip eslint and types * feat: fix identation * feat: get rid of last any types
This commit is contained in:
parent
7f06a4c707
commit
cb8f280e86
70 changed files with 6797 additions and 6541 deletions
25
web/src/types/Download.d.ts
vendored
25
web/src/types/Download.d.ts
vendored
|
@ -1,11 +1,21 @@
|
|||
type DownloadClientType =
|
||||
'QBITTORRENT' |
|
||||
'DELUGE_V1' |
|
||||
'DELUGE_V2' |
|
||||
'RADARR' |
|
||||
'SONARR' |
|
||||
'LIDARR' |
|
||||
'WHISPARR';
|
||||
"QBITTORRENT" |
|
||||
"DELUGE_V1" |
|
||||
"DELUGE_V2" |
|
||||
"RADARR" |
|
||||
"SONARR" |
|
||||
"LIDARR" |
|
||||
"WHISPARR";
|
||||
|
||||
// export enum DownloadClientTypeEnum {
|
||||
// QBITTORRENT = "QBITTORRENT",
|
||||
// DELUGE_V1 = "DELUGE_V1",
|
||||
// DELUGE_V2 = "DELUGE_V2",
|
||||
// RADARR = "RADARR",
|
||||
// SONARR = "SONARR",
|
||||
// LIDARR = "LIDARR",
|
||||
// WHISPARR = "WHISPARR"
|
||||
// }
|
||||
|
||||
interface DownloadClientRules {
|
||||
enabled: boolean;
|
||||
|
@ -27,7 +37,6 @@ interface DownloadClientSettings {
|
|||
}
|
||||
|
||||
interface DownloadClient {
|
||||
id?: number;
|
||||
id: number;
|
||||
name: string;
|
||||
type: DownloadClientType;
|
||||
|
|
36
web/src/types/Feed.d.ts
vendored
36
web/src/types/Feed.d.ts
vendored
|
@ -1,23 +1,23 @@
|
|||
interface Feed {
|
||||
id: number;
|
||||
indexer: string;
|
||||
name: string;
|
||||
type: string;
|
||||
enabled: boolean;
|
||||
url: string;
|
||||
interval: number;
|
||||
api_key: string;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
id: number;
|
||||
indexer: string;
|
||||
name: string;
|
||||
type: string;
|
||||
enabled: boolean;
|
||||
url: string;
|
||||
interval: number;
|
||||
api_key: string;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
}
|
||||
|
||||
interface FeedCreate {
|
||||
indexer: string;
|
||||
name: string;
|
||||
type: string;
|
||||
enabled: boolean;
|
||||
url: string;
|
||||
interval: number;
|
||||
api_key: string;
|
||||
indexer_id: number;
|
||||
indexer: string;
|
||||
name: string;
|
||||
type: string;
|
||||
enabled: boolean;
|
||||
url: string;
|
||||
interval: number;
|
||||
api_key: string;
|
||||
indexer_id: number;
|
||||
}
|
||||
|
|
2
web/src/types/Filter.d.ts
vendored
2
web/src/types/Filter.d.ts
vendored
|
@ -83,4 +83,4 @@ interface Action {
|
|||
client_id?: number;
|
||||
}
|
||||
|
||||
type ActionType = 'TEST' | 'EXEC' | 'WATCH_FOLDER' | 'WEBHOOK' | DownloadClientType;
|
||||
type ActionType = "TEST" | "EXEC" | "WATCH_FOLDER" | "WEBHOOK" | DownloadClientType;
|
||||
|
|
2
web/src/types/Global.d.ts
vendored
2
web/src/types/Global.d.ts
vendored
|
@ -1,3 +1,3 @@
|
|||
interface APP {
|
||||
baseUrl: string;
|
||||
baseUrl: string;
|
||||
}
|
||||
|
|
2
web/src/types/Indexer.d.ts
vendored
2
web/src/types/Indexer.d.ts
vendored
|
@ -8,7 +8,7 @@ interface Indexer {
|
|||
}
|
||||
|
||||
interface IndexerDefinition {
|
||||
id?: number;
|
||||
id: number;
|
||||
name: string;
|
||||
identifier: string;
|
||||
implementation: string;
|
||||
|
|
60
web/src/types/Irc.d.ts
vendored
60
web/src/types/Irc.d.ts
vendored
|
@ -1,29 +1,29 @@
|
|||
interface IrcNetwork {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
server: string;
|
||||
port: number;
|
||||
tls: boolean;
|
||||
pass: string;
|
||||
invite_command: string;
|
||||
nickserv?: NickServ; // optional
|
||||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
connected_since: Time;
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
server: string;
|
||||
port: number;
|
||||
tls: boolean;
|
||||
pass: string;
|
||||
invite_command: string;
|
||||
nickserv?: NickServ; // optional
|
||||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
connected_since: string;
|
||||
}
|
||||
|
||||
interface IrcNetworkCreate {
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
server: string;
|
||||
port: number;
|
||||
tls: boolean;
|
||||
pass: string;
|
||||
invite_command: string;
|
||||
nickserv?: NickServ; // optional
|
||||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
server: string;
|
||||
port: number;
|
||||
tls: boolean;
|
||||
pass: string;
|
||||
invite_command: string;
|
||||
nickserv?: NickServ; // optional
|
||||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
}
|
||||
|
||||
interface IrcChannel {
|
||||
|
@ -61,12 +61,12 @@ interface NickServ {
|
|||
}
|
||||
|
||||
interface Config {
|
||||
host: string;
|
||||
port: number;
|
||||
log_level: string;
|
||||
log_path: string;
|
||||
base_url: string;
|
||||
version: string;
|
||||
commit: string;
|
||||
date: string;
|
||||
host: string;
|
||||
port: number;
|
||||
log_level: string;
|
||||
log_path: string;
|
||||
base_url: string;
|
||||
version: string;
|
||||
commit: string;
|
||||
date: string;
|
||||
}
|
14
web/src/types/Notification.d.ts
vendored
14
web/src/types/Notification.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
type NotificationType = 'DISCORD';
|
||||
type NotificationType = "DISCORD";
|
||||
|
||||
interface Notification {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
type: NotificationType;
|
||||
events: string[];
|
||||
webhook: string;
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
type: NotificationType;
|
||||
events: string[];
|
||||
webhook: string;
|
||||
}
|
50
web/src/types/Release.d.ts
vendored
50
web/src/types/Release.d.ts
vendored
|
@ -1,38 +1,38 @@
|
|||
interface Release {
|
||||
id: number;
|
||||
filter_status: string;
|
||||
rejections: string[];
|
||||
indexer: string;
|
||||
filter: string;
|
||||
protocol: string;
|
||||
title: string;
|
||||
size: number;
|
||||
raw: string;
|
||||
timestamp: Date
|
||||
action_status: ReleaseActionStatus[]
|
||||
id: number;
|
||||
filter_status: string;
|
||||
rejections: string[];
|
||||
indexer: string;
|
||||
filter: string;
|
||||
protocol: string;
|
||||
title: string;
|
||||
size: number;
|
||||
raw: string;
|
||||
timestamp: Date
|
||||
action_status: ReleaseActionStatus[]
|
||||
}
|
||||
|
||||
interface ReleaseActionStatus {
|
||||
id: number;
|
||||
status: string;
|
||||
action: string;
|
||||
type: string;
|
||||
rejections: string[];
|
||||
timestamp: string
|
||||
id: number;
|
||||
status: string;
|
||||
action: string;
|
||||
type: string;
|
||||
rejections: string[];
|
||||
timestamp: string
|
||||
}
|
||||
|
||||
interface ReleaseFindResponse {
|
||||
data: Release[];
|
||||
next_cursor: number;
|
||||
count: number;
|
||||
data: Release[];
|
||||
next_cursor: number;
|
||||
count: number;
|
||||
}
|
||||
|
||||
interface ReleaseStats {
|
||||
total_count: number;
|
||||
filtered_count: number;
|
||||
filter_rejected_count: number;
|
||||
push_approved_count: number;
|
||||
push_rejected_count: number;
|
||||
total_count: number;
|
||||
filtered_count: number;
|
||||
filter_rejected_count: number;
|
||||
push_approved_count: number;
|
||||
push_rejected_count: number;
|
||||
}
|
||||
|
||||
interface ReleaseFilter {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue