Formatting with eslint

Should probably be configured to run for every commit in the future
This commit is contained in:
Tobias Karlsson
2023-04-13 08:59:54 +02:00
parent f092e23e72
commit 9a25d3bcf9
10 changed files with 200 additions and 200 deletions

View File

@@ -10,7 +10,7 @@ import {
PersonMovieCredit,
PersonTvShowCredit,
PopularPersons,
TaggedImages
TaggedImages,
} from '../types';
import { parseOptions } from '../utils';
import { BaseEndpoint } from './base';
@@ -40,15 +40,15 @@ export class PeopleEndpoint extends BaseEndpoint {
}
async combinedCredits(id: number) : Promise<PersonCombinedCredits> {
return await this.api.get<PersonCombinedCredits>(`${BASE_PERSON}/${id}/combined_credits`)
return await this.api.get<PersonCombinedCredits>(`${BASE_PERSON}/${id}/combined_credits`);
}
async externalId(id: number): Promise<ExternalIds>{
return await this.api.get<ExternalIds>(`${BASE_PERSON}/${id}/external_ids`)
return await this.api.get<ExternalIds>(`${BASE_PERSON}/${id}/external_ids`);
}
async images(id: number): Promise<{id: number, profiles: Image[]}>{
return await this.api.get<{id: number, profiles: Image[]}>(`${BASE_PERSON}/${id}/images`)
return await this.api.get<{id: number, profiles: Image[]}>(`${BASE_PERSON}/${id}/images`);
}
async taggedImages(id: number, options?: PageOption): Promise<TaggedImages>{
@@ -57,7 +57,7 @@ export class PeopleEndpoint extends BaseEndpoint {
}
async translation(id: number) : Promise<PeopleTranslations>{
return await this.api.get<PeopleTranslations>(`${BASE_PERSON}/${id}/translations`)
return await this.api.get<PeopleTranslations>(`${BASE_PERSON}/${id}/translations`);
}
async latest(): Promise<PersonDetail>{

View File

@@ -1,4 +1,4 @@
import { MediaType, TimeWindow, TrendingResults, } from '../types';
import { MediaType, TimeWindow, TrendingResults } from '../types';
import { BaseEndpoint } from './base';
export class TrendingEndpoint extends BaseEndpoint {

View File

@@ -1,4 +1,4 @@
import { Movie } from ".";
import { Movie } from '.';
export interface Collection {
id: number;

View File

@@ -1,4 +1,4 @@
import { Movie, TV } from ".";
import { Movie, TV } from '.';
export type SortOption =
| 'popularity.asc'

View File

@@ -1,4 +1,4 @@
import { Episode, Media, MediaType, Movie, Person, Season, TV } from '.';
import { Episode, MediaType, Movie, Person, Season, TV } from '.';
export type ExternalSource =
| 'imdb_id'

View File

@@ -1,4 +1,4 @@
import { Movie, Person, TV, TvShowItem } from ".";
import { Movie, Person, TV } from '.';
interface Cast {
character: string;
@@ -80,30 +80,30 @@ export interface PersonCombinedCredits {
}
export interface PersonDetail {
birthday: string,
known_for_department: string,
deathday: string,
id: number,
name: string,
also_known_as: string[]
gender: number,
biography: string,
popularity: number,
place_of_birth: string,
profile_path: string,
adult: boolean,
imdb_id: string,
homepage: string
birthday: string;
known_for_department: string;
deathday: string;
id: number;
name: string;
also_known_as: string[];
gender: number;
biography: string;
popularity: number;
place_of_birth: string;
profile_path: string;
adult: boolean;
imdb_id: string;
homepage: string;
}
export interface PersonChange{
export interface PersonChange {
id: string;
action: string;
time: string;
iso_639_1: string;
iso_3166_1: string;
value: string | { profile: { file_path: string;} };
original_value: string | { profile: { file_path: string; } };
value: string | { profile: { file_path: string } };
original_value: string | { profile: { file_path: string } };
}
export interface PersonChanges {
@@ -113,14 +113,14 @@ export interface PersonChanges {
}[];
}
export interface PopularPersons{
export interface PopularPersons {
page: number;
results: Person[];
total_results: number;
total_pages: number;
}
export interface TaggedImage{
export interface TaggedImage {
aspect_ratio: number;
file_path: string;
height: number;
@@ -131,17 +131,17 @@ export interface TaggedImage{
width: number;
image_type: string;
media_type: string;
media: Movie | TV
media: Movie | TV;
}
export interface TaggedImages{
export interface TaggedImages {
page: number;
results: TaggedImage[];
total_results: number;
total_pages: number;
}
export interface PeopleTranslations{
export interface PeopleTranslations {
id: number;
translations: {
iso_3166_1: string;
@@ -149,7 +149,7 @@ export interface PeopleTranslations{
name: string;
english_name: string;
data: {
biography: string
biography: string;
};
};
}
}

View File

@@ -4,12 +4,12 @@ export type MediaType = 'all' | 'movie' | 'tv' | 'person';
export type TimeWindow = 'day' | 'week';
type TrendingResult<T extends MediaType> = T extends 'tv'
? TV
: T extends 'movie'
? Movie
: T extends 'person'
? Person
: TV | Movie | Person;
? TV
: T extends 'movie'
? Movie
: T extends 'person'
? Person
: TV | Movie | Person;
export interface TrendingResults<T extends MediaType> {
page: number;