Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisermann committed Feb 15, 2021
1 parent 5771c7c commit 378a7cb
Show file tree
Hide file tree
Showing 4 changed files with 1,241 additions and 1,089 deletions.
10 changes: 6 additions & 4 deletions src/runtime/includes/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ const createDateFormatter: MemoizedDateTimeFormatterFactory = monadicMemoize(
throw new Error('[svelte-i18n] A "locale" must be set to format dates');
}

if (format) options = getIntlFormatterOptions('date', format);
else if (Object.keys(options).length === 0) {
if (format) {
options = getIntlFormatterOptions('date', format);
} else if (Object.keys(options).length === 0) {
options = getIntlFormatterOptions('date', 'short');
}

Expand All @@ -65,8 +66,9 @@ const createTimeFormatter: MemoizedDateTimeFormatterFactory = monadicMemoize(
);
}

if (format) options = getIntlFormatterOptions('time', format);
else if (Object.keys(options).length === 0) {
if (format) {
options = getIntlFormatterOptions('time', format);
} else if (Object.keys(options).length === 0) {
options = getIntlFormatterOptions('time', 'short');
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/stores/dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function addMessages(locale: string, ...partials: LocaleDictionary[]) {
});
}

// eslint-disable-next-line no-shadow
// eslint-disable-next-line @typescript-eslint/no-shadow
const $locales = derived([$dictionary], ([dictionary]) =>
Object.keys(dictionary),
);
Expand Down
1 change: 1 addition & 0 deletions test/runtime/configs.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable node/global-require */
import { get } from 'svelte/store';

import {
Expand Down
Loading

0 comments on commit 378a7cb

Please sign in to comment.