eslint: use semicolon TypeScript delimeter
This commit is contained in:
@@ -5,8 +5,8 @@ import { queryClient } from 'soapbox/queries/client';
|
||||
import { PaginatedResult, sortQueryData, updatePageItem } from '../queries';
|
||||
|
||||
interface Item {
|
||||
id: number
|
||||
text: string
|
||||
id: number;
|
||||
text: string;
|
||||
}
|
||||
|
||||
const buildItem = (id: number): Item => ({ id, text: `item ${id}` });
|
||||
|
||||
@@ -11,9 +11,9 @@ const badgeToTag = (badge: string) => badge.replace(/^badge:/, '');
|
||||
/** Difference between an old and new set of tags. */
|
||||
interface TagDiff {
|
||||
/** New tags that were added. */
|
||||
added: string[]
|
||||
added: string[];
|
||||
/** Old tags that were removed. */
|
||||
removed: string[]
|
||||
removed: string[];
|
||||
}
|
||||
|
||||
/** Returns the differences between two sets of tags. */
|
||||
|
||||
@@ -10,7 +10,7 @@ import { compareDate } from './comparators';
|
||||
import { appendPageItem, flattenPages, PaginatedResult, sortQueryData, updatePageItem } from './queries';
|
||||
|
||||
interface ChatPayload extends Omit<Chat, 'last_message'> {
|
||||
last_message: ChatMessage | null
|
||||
last_message: ChatMessage | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -98,7 +98,7 @@ export default function(baseColor: string): TailwindColorObject {
|
||||
};
|
||||
|
||||
const intensityMap: {
|
||||
[key: number]: number
|
||||
[key: number]: number;
|
||||
} = {
|
||||
50: 0.95,
|
||||
100: 0.9,
|
||||
|
||||
@@ -9,7 +9,7 @@ const toSentence = (arr: string[]) => arr
|
||||
.slice(0, -2);
|
||||
|
||||
type Errors = {
|
||||
[key: string]: string[]
|
||||
[key: string]: string[];
|
||||
}
|
||||
|
||||
const buildErrorMessage = (errors: Errors) => {
|
||||
@@ -22,7 +22,7 @@ const buildErrorMessage = (errors: Errors) => {
|
||||
return toSentence(individualErrors);
|
||||
};
|
||||
|
||||
const httpErrorMessages: { code: number, name: string, description: string }[] = [
|
||||
const httpErrorMessages: { code: number; name: string; description: string }[] = [
|
||||
{
|
||||
code: 100,
|
||||
name: 'Continue',
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// https://git.pleroma.social/pleroma/pleroma-fe/-/blob/ef5bbc4e5f84bb9e8da76a0440eea5d656d36977/src/services/favicon_service/favicon_service.js
|
||||
|
||||
type Favicon = {
|
||||
favcanvas: HTMLCanvasElement
|
||||
favimg: HTMLImageElement
|
||||
favcontext: CanvasRenderingContext2D | null
|
||||
favicon: HTMLLinkElement
|
||||
favcanvas: HTMLCanvasElement;
|
||||
favimg: HTMLImageElement;
|
||||
favcontext: CanvasRenderingContext2D | null;
|
||||
favicon: HTMLLinkElement;
|
||||
};
|
||||
|
||||
/** Service to draw and update a notifications dot on the favicon */
|
||||
|
||||
@@ -953,13 +953,13 @@ export const getFeatures = createSelector([
|
||||
/** Fediverse backend */
|
||||
interface Backend {
|
||||
/** Build name, if this software is a fork */
|
||||
build: string | null
|
||||
build: string | null;
|
||||
/** Name of the software */
|
||||
software: string | null
|
||||
software: string | null;
|
||||
/** API version number */
|
||||
version: string
|
||||
version: string;
|
||||
/** Mastodon API version this backend is compatible with */
|
||||
compatVersion: string
|
||||
compatVersion: string;
|
||||
}
|
||||
|
||||
/** Get information about the software from its version string */
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { default as lodashGet } from 'lodash/get';
|
||||
|
||||
interface LegacyMap {
|
||||
get(key: any): unknown
|
||||
getIn(keyPath: any[]): unknown
|
||||
toJS(): any
|
||||
get(key: any): unknown;
|
||||
getIn(keyPath: any[]): unknown;
|
||||
toJS(): any;
|
||||
}
|
||||
|
||||
interface LegacyStore<T> extends LegacyMap {
|
||||
get(key: any): T & LegacyMap | undefined
|
||||
getIn(keyPath: any[]): unknown
|
||||
find(predicate: (value: T & LegacyMap, key: string) => boolean): T & LegacyMap | undefined
|
||||
filter(predicate: (value: T & LegacyMap, key: string) => boolean): (T & LegacyMap)[]
|
||||
get(key: any): T & LegacyMap | undefined;
|
||||
getIn(keyPath: any[]): unknown;
|
||||
find(predicate: (value: T & LegacyMap, key: string) => boolean): T & LegacyMap | undefined;
|
||||
filter(predicate: (value: T & LegacyMap, key: string) => boolean): (T & LegacyMap)[];
|
||||
}
|
||||
|
||||
function immutableizeEntity<T extends Record<any, any>>(entity: T): T & LegacyMap {
|
||||
|
||||
@@ -3,13 +3,13 @@ import { queryClient } from 'soapbox/queries/client';
|
||||
import type { InfiniteData, QueryKey } from '@tanstack/react-query';
|
||||
|
||||
export interface PaginatedResult<T> {
|
||||
result: T[]
|
||||
hasMore: boolean
|
||||
link?: string
|
||||
result: T[];
|
||||
hasMore: boolean;
|
||||
link?: string;
|
||||
}
|
||||
|
||||
interface Entity {
|
||||
id: string
|
||||
id: string;
|
||||
}
|
||||
|
||||
const isEntity = <T = unknown>(object: T): object is T & Entity => {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
const DEFAULT_MAX_PIXELS = 1920 * 1080;
|
||||
|
||||
interface BrowserCanvasQuirks {
|
||||
'image-orientation-automatic'?: boolean
|
||||
'canvas-read-unreliable'?: boolean
|
||||
'image-orientation-automatic'?: boolean;
|
||||
'canvas-read-unreliable'?: boolean;
|
||||
}
|
||||
|
||||
const _browser_quirks: BrowserCanvasQuirks = {};
|
||||
@@ -147,11 +147,11 @@ const processImage = (
|
||||
type = 'image/png',
|
||||
name = 'resized.png',
|
||||
} : {
|
||||
width: number
|
||||
height: number
|
||||
orientation: number
|
||||
type?: string
|
||||
name?: string
|
||||
width: number;
|
||||
height: number;
|
||||
orientation: number;
|
||||
type?: string;
|
||||
name?: string;
|
||||
},
|
||||
) => new Promise<File>((resolve, reject) => {
|
||||
const canvas = document.createElement('canvas');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** Soapbox audio clip. */
|
||||
type Sound = {
|
||||
src: string
|
||||
type: string
|
||||
src: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export type Sounds = 'boop' | 'chat'
|
||||
|
||||
Reference in New Issue
Block a user