Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ export default ts.config(
languageOptions: {
globals: { ...globals.browser, ...globals.node }
},
rules: { "no-undef": "off" }
rules: { "no-undef": "off" },
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true
}
]
},
{
files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/pages/Playground/Playground.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import { getAnnouncer } from "$lib/live-announcer/util";

type Props = {
data: { [key: string]: BrowserSupportDataForMethod };
data?: { [key: string]: BrowserSupportDataForMethod };
isLoading?: boolean;
};

Expand All @@ -52,7 +52,7 @@

let schema = $derived(validateAndUpdateSchema(numberFormatSchema));
let browserSupportData = $derived(
schema
schema && data
? { ...data[schema.method] }
: { optionsSupport: undefined, formattersSupport: undefined }
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{/each}
</div>
{/if}
{#if support?.[option.name]?.support && $settings.showBrowserSupport}
{#if support?.[option.name]?.support && $settings.showBrowserSupport && !isLoadingSupportData}
<Spacing />
<div class="browser-support-wrapper">
<div
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/ui/SettingsDialog.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { page } from "$app/state";
import { browser } from "$app/environment";

import Dialog from "$ui/Dialog.svelte";
import Radio from "$ui/Radio.svelte";
Expand Down Expand Up @@ -151,7 +152,7 @@
<Button
href={`${localizeHref(page.url.href, {
locale: language
})}${formatLocaleForUrl($locales)}`}
})}`}
hrefLang={language}
>
{m.confirmLanguage()}
Expand Down
6 changes: 2 additions & 4 deletions src/routes/Playground/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
</svelte:head>

{#await browserSupport}
<Playground data={{}} isLoading />
<Playground isLoading />
{:then data}
{#if data}
<Playground {data} />
{/if}
<Playground {data} />
{/await}