mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix linting
This commit is contained in:
@@ -2,12 +2,10 @@ export type PrefRow = { key: string; value: string };
|
||||
|
||||
export function normalizePrefs(entries: [string, string][] | PrefRow[]): [string, string][] {
|
||||
return entries
|
||||
.map((item): [string, string] =>
|
||||
Array.isArray(item)
|
||||
? [item[0], item[1]]
|
||||
: [item.key, item.value]
|
||||
)
|
||||
|
||||
.map((item): [string, string] =>
|
||||
Array.isArray(item) ? [item[0], item[1]] : [item.key, item.value]
|
||||
)
|
||||
|
||||
.filter(([k, v]) => k.trim() && v.trim())
|
||||
.sort(([a], [b]) => a.localeCompare(b));
|
||||
}
|
||||
|
||||
+6
-2
@@ -13,8 +13,12 @@
|
||||
import { page } from '$app/state';
|
||||
import deepEqual from 'deep-equal';
|
||||
import type { PrefRow } from '$lib/helpers/prefs';
|
||||
import { normalizePrefs, createPrefRow, isAddDisabled, sanitizePrefs } from '$lib/helpers/prefs';
|
||||
|
||||
import {
|
||||
normalizePrefs,
|
||||
createPrefRow,
|
||||
isAddDisabled,
|
||||
sanitizePrefs
|
||||
} from '$lib/helpers/prefs';
|
||||
|
||||
$: if (prefs) {
|
||||
const currentNormalized = normalizePrefs(prefs);
|
||||
|
||||
@@ -13,8 +13,12 @@
|
||||
import { page } from '$app/state';
|
||||
import deepEqual from 'deep-equal';
|
||||
import type { PrefRow } from '$lib/helpers/prefs';
|
||||
import { normalizePrefs, createPrefRow, isAddDisabled, sanitizePrefs } from '$lib/helpers/prefs';
|
||||
|
||||
import {
|
||||
normalizePrefs,
|
||||
createPrefRow,
|
||||
isAddDisabled,
|
||||
sanitizePrefs
|
||||
} from '$lib/helpers/prefs';
|
||||
|
||||
$: if (prefs) {
|
||||
const currentNormalized = normalizePrefs(prefs);
|
||||
|
||||
Reference in New Issue
Block a user