feat: Migrate ESLint to flat config and resolve initial linting errors
Migrated the ESLint configuration to the new flat config format () and addressed several initial linting errors. Key changes include: - Updated ESLint configuration to treat as warnings instead of errors. - Fixed errors in by declaring and . - Corrected error in by using instead of an out-of-scope . - Resolved error in by replacing the undefined directive with the component. - Addressed errors in by replacing with and with . - Fixed errors in by importing necessary modules (, , ) and adding missing props (, , , , ).
This commit is contained in:
@@ -1,118 +1,118 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
log_lvl?: number;
|
||||
}
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
let {
|
||||
data,
|
||||
log_lvl = 0
|
||||
}: Props = $props();
|
||||
let { data, log_lvl = 0 }: Props = $props();
|
||||
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
// import { browser } from '$app/environment';
|
||||
import { liveQuery } from "dexie";
|
||||
// *** Import other supporting libraries
|
||||
// import { browser } from '$app/environment';
|
||||
import { liveQuery } from 'dexie';
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
// import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/stores/ae_stores';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import MyClipboard from '$lib/e_app_clipboard.svelte';
|
||||
// *** Import Aether specific variables and functions
|
||||
// import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
import {
|
||||
ae_snip,
|
||||
ae_loc,
|
||||
ae_sess,
|
||||
ae_api,
|
||||
ae_trig,
|
||||
slct,
|
||||
slct_trigger
|
||||
} from '$lib/stores/ae_stores';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import MyClipboard from '$lib/e_app_clipboard.svelte';
|
||||
|
||||
import { db_events } from "$lib/ae_events/db_events";
|
||||
// import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
// import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import {
|
||||
events_loc,
|
||||
events_sess,
|
||||
events_slct,
|
||||
events_trigger
|
||||
} from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
import Comp_badge_search from './ae_comp__badge_search.svelte';
|
||||
import Comp_badge_obj_li from './ae_comp__badge_obj_li.svelte';
|
||||
import Comp_badge_search from './ae_comp__badge_search.svelte';
|
||||
import Comp_badge_obj_li from './ae_comp__badge_obj_li.svelte';
|
||||
|
||||
// *** Variables
|
||||
// let test_event_id = data.params.event_id;
|
||||
// console.log(`Data Params: event_id=${test_event_id}`);
|
||||
let url_test_val = data.url.searchParams.get('test_val');
|
||||
console.log(`URL test_val = ${url_test_val}`);
|
||||
|
||||
// *** Variables
|
||||
// let test_event_id = data.params.event_id;
|
||||
// console.log(`Data Params: event_id=${test_event_id}`);
|
||||
let url_test_val = data.url.searchParams.get('test_val');
|
||||
console.log(`URL test_val = ${url_test_val}`);
|
||||
let lq__event_obj = $derived(
|
||||
liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`*** LiveQuery: lq__event_obj *** event_id=${$events_slct.event_id}`);
|
||||
}
|
||||
let results = await db_events.event.get($events_slct?.event_id ?? '');
|
||||
|
||||
let lq__event_obj = $derived(liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`*** LiveQuery: lq__event_obj *** event_id=${$events_slct.event_id}`);
|
||||
}
|
||||
let results = await db_events.event
|
||||
.get($events_slct?.event_id ?? '');
|
||||
return results;
|
||||
})
|
||||
);
|
||||
|
||||
return results;
|
||||
}));
|
||||
let event_badge_id_li: Array<string> = $state([]);
|
||||
// let dq__where_type_id_val: string = `event_id_random`;
|
||||
// let dq__where_eq_id_val: string = $events_slct?.event_id ?? '';
|
||||
|
||||
let event_badge_id_li: Array<string> = $state([]);
|
||||
// let dq__where_type_id_val: string = `event_id_random`;
|
||||
// let dq__where_eq_id_val: string = $events_slct?.event_id ?? '';
|
||||
// let lq__event_badge_obj_li = $derived(liveQuery(async () => {
|
||||
// if (event_badge_id_li.length > 0) {
|
||||
// let results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
|
||||
// let lq__event_badge_obj_li = $derived(liveQuery(async () => {
|
||||
// if (event_badge_id_li.length > 0) {
|
||||
// let results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
|
||||
// return results;
|
||||
// } else {
|
||||
// let results = await db_events.badge
|
||||
// .where(dq__where_type_id_val)
|
||||
// .equals(dq__where_eq_id_val)
|
||||
// .sortBy('given_name')
|
||||
// // This should be sorted by a custom sort field
|
||||
|
||||
// return results;
|
||||
// }
|
||||
// }));
|
||||
|
||||
// *** Functions and Logic
|
||||
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
|
||||
// let url_test_val = data.url.searchParams.get('test_val');
|
||||
// console.log(`URL test_val = ${url_test_val}`);
|
||||
// }
|
||||
// return results;
|
||||
// } else {
|
||||
// let results = await db_events.badge
|
||||
// .where(dq__where_type_id_val)
|
||||
// .equals(dq__where_eq_id_val)
|
||||
// .sortBy('given_name')
|
||||
// // This should be sorted by a custom sort field
|
||||
|
||||
// return results;
|
||||
// }
|
||||
// }));
|
||||
|
||||
// *** Functions and Logic
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
|
||||
// let url_test_val = data.url.searchParams.get('test_val');
|
||||
// console.log(`URL test_val = ${url_test_val}`);
|
||||
// }
|
||||
</script>
|
||||
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
Badges -
|
||||
{ae_util.shorten_string({string: $lq__event_obj?.name ?? '-- not set --', max_length: 12})}
|
||||
- OSIT's Æ Events
|
||||
</title>
|
||||
Badges -
|
||||
{ae_util.shorten_string({ string: $lq__event_obj?.name ?? '-- not set --', max_length: 12 })}
|
||||
- OSIT's Æ Events
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
<!-- badges +page: Where is here??? -->
|
||||
|
||||
|
||||
<!-- event_badge_obj_li={$lq__event_badge_obj_li} -->
|
||||
<Comp_badge_search
|
||||
event_id={$events_slct?.event_id ?? ''}
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
bind:event_badge_id_li={event_badge_id_li}
|
||||
bind:search_status={$events_sess.badges.search_status}
|
||||
bind:search_complete={$events_sess.badges.search_complete}
|
||||
bind:qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
bind:qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
>
|
||||
</Comp_badge_search>
|
||||
|
||||
event_id={$events_slct?.event_id ?? ''}
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
bind:event_badge_id_li
|
||||
bind:search_status={$events_sess.badges.search_status}
|
||||
bind:search_complete={$events_sess.badges.search_complete}
|
||||
bind:qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
bind:qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
></Comp_badge_search>
|
||||
|
||||
<!-- {#await $lq__event_badge_obj_li}
|
||||
Loading....
|
||||
@@ -120,19 +120,17 @@ let event_badge_id_li: Array<string> = $state([]);
|
||||
|
||||
{/await} -->
|
||||
|
||||
|
||||
<!-- This is how we reset the Dixie liveQuery when the search parameters change. I wish there was a better way??? -->
|
||||
{#if $events_sess?.badges?.search_status != 'loading' && $events_sess?.badges?.search_status != 'processing'}
|
||||
<Comp_badge_obj_li
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
event_badge_id_li={event_badge_id_li}
|
||||
qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
>
|
||||
</Comp_badge_obj_li>
|
||||
{#if $events_sess?.badges?.search_status != 'loading' && $events_sess?.badges?.search_status != 'processing'}
|
||||
<Comp_badge_obj_li
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
{event_badge_id_li}
|
||||
qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
></Comp_badge_obj_li>
|
||||
{:else}
|
||||
<p class="p-4 italic text-sm text-surface-400">Loading badges...</p>
|
||||
<p class="p-4 italic text-sm text-surface-400">Loading badges...</p>
|
||||
{/if}
|
||||
|
||||
<!-- {#if event_badge_id_li && event_badge_id_li?.length > 0}
|
||||
@@ -145,4 +143,4 @@ let event_badge_id_li: Array<string> = $state([]);
|
||||
</Comp_badge_obj_li>
|
||||
{:else}
|
||||
<p class="p-4 italic text-sm text-surface-400">No badges found for this event.</p>
|
||||
{/if} -->
|
||||
{/if} -->
|
||||
|
||||
Reference in New Issue
Block a user