Change ESLint rules, lint
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@@ -5,7 +5,7 @@ import { queryClient } from 'soapbox/queries/client';
|
||||
import { PaginatedResult, sortQueryData, updatePageItem } from '../queries';
|
||||
|
||||
interface Item {
|
||||
id: number,
|
||||
id: number
|
||||
text: string
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -862,13 +862,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 */
|
||||
|
||||
@@ -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 = {};
|
||||
@@ -146,11 +146,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'
|
||||
|
||||
@@ -68,9 +68,9 @@ export const textForScreenReader = (intl: IntlShape, status: StatusEntity, reblo
|
||||
/** Get reblogged status if any, otherwise return the original status. */
|
||||
// @ts-ignore The type seems right, but TS doesn't like it.
|
||||
export const getActualStatus: {
|
||||
(status: StatusEntity): StatusEntity,
|
||||
(status: undefined): undefined,
|
||||
(status: null): null,
|
||||
(status: StatusEntity): StatusEntity
|
||||
(status: undefined): undefined
|
||||
(status: null): null
|
||||
} = (status) => {
|
||||
if (status?.reblog && typeof status?.reblog === 'object') {
|
||||
return status.reblog as StatusEntity;
|
||||
|
||||
Reference in New Issue
Block a user