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:
@@ -5,65 +5,67 @@ import { error } from '@sveltejs/kit';
|
||||
import { browser } from '$app/environment';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
export async function load({ params, parent, url }) {
|
||||
// route
|
||||
const log_lvl: number = 0;
|
||||
|
||||
export async function load({ params, parent, url }) { // route
|
||||
let log_lvl: number = 0;
|
||||
const data = await parent();
|
||||
// console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data);
|
||||
data.log_lvl = log_lvl;
|
||||
|
||||
let data = await parent();
|
||||
// console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data);
|
||||
data.log_lvl = log_lvl;
|
||||
const account_id = data.account_id;
|
||||
const ae_acct = data[account_id];
|
||||
|
||||
let account_id = data.account_id;
|
||||
let ae_acct = data[account_id];
|
||||
|
||||
let event_id = params.event_id;
|
||||
if (!event_id) {
|
||||
console.log(`ae Events - [event_id] +page.ts: The event_id was not found in the params.event_id!!!`);
|
||||
error(404, {
|
||||
const event_id = params.event_id;
|
||||
if (!event_id) {
|
||||
console.log(
|
||||
`ae Events - [event_id] +page.ts: The event_id was not found in the params.event_id!!!`
|
||||
);
|
||||
error(404, {
|
||||
message: 'Events Pres Mgmt - Event ID not found'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ae_acct.slct.event_id = event_id;
|
||||
ae_acct.slct.event_id = event_id;
|
||||
|
||||
if (browser) {
|
||||
// console.log(`TEST URL Params`, params);
|
||||
// console.log(`TEST URL`, url);
|
||||
if (browser) {
|
||||
// console.log(`TEST URL Params`, params);
|
||||
// console.log(`TEST URL`, url);
|
||||
|
||||
let load_event_obj = await events_func.load_ae_obj_id__event({
|
||||
api_cfg: ae_acct.api,
|
||||
event_id: event_id,
|
||||
// inc_file_li: true,
|
||||
// inc_device_li: true,
|
||||
inc_location_li: true,
|
||||
inc_session_li: true,
|
||||
// inc_badge_li: true,
|
||||
inc_template_li: true,
|
||||
log_lvl: log_lvl
|
||||
// })
|
||||
// .then((results) => {
|
||||
// if (!results) {
|
||||
// error(404, {
|
||||
// message: 'Events - Event not found'
|
||||
// });
|
||||
// } else {
|
||||
// // ae_acct.slct.event_obj = results;
|
||||
// }
|
||||
});
|
||||
if (!load_event_obj) {
|
||||
error(404, {
|
||||
message: 'Events - Event not found'
|
||||
});
|
||||
}
|
||||
console.log(`load_event_obj = `, load_event_obj);
|
||||
ae_acct.slct.event_obj = load_event_obj;
|
||||
// ae_acct.slct.event_device_obj_li = load_event_obj.event_device_obj_li;
|
||||
ae_acct.slct.event_location_obj_li = load_event_obj.event_location_obj_li;
|
||||
ae_acct.slct.event_session_obj_li = load_event_obj.event_session_obj_li;
|
||||
}
|
||||
const load_event_obj = await events_func.load_ae_obj_id__event({
|
||||
api_cfg: ae_acct.api,
|
||||
event_id: event_id,
|
||||
// inc_file_li: true,
|
||||
// inc_device_li: true,
|
||||
inc_location_li: true,
|
||||
inc_session_li: true,
|
||||
// inc_badge_li: true,
|
||||
inc_template_li: true,
|
||||
log_lvl: log_lvl
|
||||
// })
|
||||
// .then((results) => {
|
||||
// if (!results) {
|
||||
// error(404, {
|
||||
// message: 'Events - Event not found'
|
||||
// });
|
||||
// } else {
|
||||
// // ae_acct.slct.event_obj = results;
|
||||
// }
|
||||
});
|
||||
if (!load_event_obj) {
|
||||
error(404, {
|
||||
message: 'Events - Event not found'
|
||||
});
|
||||
}
|
||||
console.log(`load_event_obj = `, load_event_obj);
|
||||
ae_acct.slct.event_obj = load_event_obj;
|
||||
// ae_acct.slct.event_device_obj_li = load_event_obj.event_device_obj_li;
|
||||
ae_acct.slct.event_location_obj_li = load_event_obj.event_location_obj_li;
|
||||
ae_acct.slct.event_session_obj_li = load_event_obj.event_session_obj_li;
|
||||
}
|
||||
|
||||
// WARNING: Precaution against shared data between sites and sessions.
|
||||
data[account_id] = ae_acct;
|
||||
// WARNING: Precaution against shared data between sites and sessions.
|
||||
data[account_id] = ae_acct;
|
||||
|
||||
return data;
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user