Add "@typescript-eslint/member-delimiter-style" rule

Apply to all files in /src/js/
This commit is contained in:
0x1eef 2023-01-04 23:48:35 -03:00
parent 2b06c933ee
commit 22fd27bba9
7 changed files with 34 additions and 33 deletions

View file

@ -4,6 +4,7 @@ module.exports = {
project: "./tsconfig.json",
},
rules: {
"@typescript-eslint/member-delimiter-style": 2,
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/explicit-function-return-type": 0,

View file

@ -4,13 +4,13 @@ import classnames from "classnames";
export type ChangeEvent = React.MouseEvent<HTMLLIElement> & {target: HTMLLIElement};
export interface SelectOption {
innerText: string,
value: string,
innerText: string
value: string
reactEvent: ChangeEvent
}
interface Props {
value: string,
value: string
children: JSX.Element[]
onChange: (e: SelectOption) => void
className?: string

View file

@ -3,8 +3,8 @@ import { Select, SelectOption } from "components/Select";
import { Surah, Ayah } from "lib/Quran";
interface Props {
locale: string,
surah: Surah,
locale: string
surah: Surah
stream: Ayah[]
}

View file

@ -4,10 +4,10 @@ import { numbers, strings } from "lib/i18n";
import classNames from "classnames";
interface Props {
surah: Surah;
stream: Ayat;
locale: Locale;
ayahId: number;
surah: Surah
stream: Ayat
locale: Locale
ayahId: number
}
export function Stream({ surah, stream, locale, ayahId }: Props) {

View file

@ -4,23 +4,23 @@ import { DelayBaseLine, DelayPerWord } from "lib/i18n";
export type Ayat = Ayah[];
interface SurahDetails {
id: string;
place_of_revelation: string;
transliterated_name: string;
translated_name: string;
verse_count: number;
slug: string;
codepoints: number[];
id: string
place_of_revelation: string
transliterated_name: string
translated_name: string
verse_count: number
slug: string
codepoints: number[]
}
export interface Ayah {
id: IDObject,
text: string;
readTimeMs: number;
id: IDObject
text: string
readTimeMs: number
}
interface IDObject {
number: number,
number: number
localeKey: string[]
}

View file

@ -1,21 +1,21 @@
export interface WebPackage {
fetch: () => Promise<Package>,
fetch: () => Promise<Package>
}
export interface Package {
scripts: HTMLElement[],
stylesheets: HTMLElement[],
images: HTMLElement[],
fonts: FontFace[],
scripts: HTMLElement[]
stylesheets: HTMLElement[]
images: HTMLElement[]
fonts: FontFace[]
others: HTMLElement[]
}
export interface PackageSpec {
scripts?: string[],
stylesheets?: string[],
images?: string[],
fonts?: Array<[string, string]>,
others?: string[],
scripts?: string[]
stylesheets?: string[]
images?: string[]
fonts?: Array<[string, string]>
others?: string[]
onprogress?: (percent: number) => any
}

View file

@ -9,9 +9,9 @@ import { LanguageSelect } from "components/TheQuran/LanguageSelect";
import { Locale, Surah } from "lib/Quran";
interface Props {
locale: Locale;
surahId: number;
ayahId: number;
locale: Locale
surahId: number
ayahId: number
}
function TheSurahPage({ locale, surahId, ayahId }: Props) {