diff --git a/.eslintrc.js b/.eslintrc.js index 9fdf58ddf..c1e67d733 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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, diff --git a/src/js/components/Select.tsx b/src/js/components/Select.tsx index 887fb0d05..d3dc3b00a 100644 --- a/src/js/components/Select.tsx +++ b/src/js/components/Select.tsx @@ -4,13 +4,13 @@ import classnames from "classnames"; export type ChangeEvent = React.MouseEvent & {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 diff --git a/src/js/components/TheQuran/LanguageSelect.tsx b/src/js/components/TheQuran/LanguageSelect.tsx index fb0df909d..2597e5901 100644 --- a/src/js/components/TheQuran/LanguageSelect.tsx +++ b/src/js/components/TheQuran/LanguageSelect.tsx @@ -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[] } diff --git a/src/js/components/TheQuran/Stream.tsx b/src/js/components/TheQuran/Stream.tsx index a364a00be..fa2e234f8 100644 --- a/src/js/components/TheQuran/Stream.tsx +++ b/src/js/components/TheQuran/Stream.tsx @@ -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) { diff --git a/src/js/lib/Quran/Surah.ts b/src/js/lib/Quran/Surah.ts index aaf5960eb..e68acd6b8 100644 --- a/src/js/lib/Quran/Surah.ts +++ b/src/js/lib/Quran/Surah.ts @@ -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[] } diff --git a/src/js/lib/WebPackage/types.ts b/src/js/lib/WebPackage/types.ts index 8cd9b492d..cfc282d1e 100644 --- a/src/js/lib/WebPackage/types.ts +++ b/src/js/lib/WebPackage/types.ts @@ -1,21 +1,21 @@ export interface WebPackage { - fetch: () => Promise, + fetch: () => Promise } 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 } diff --git a/src/js/pages/TheSurahPage.tsx b/src/js/pages/TheSurahPage.tsx index fa6ffe0c2..f57e10116 100644 --- a/src/js/pages/TheSurahPage.tsx +++ b/src/js/pages/TheSurahPage.tsx @@ -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) {