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:
@@ -6,40 +6,40 @@ import { error } from '@sveltejs/kit';
|
||||
import { browser } from '$app/environment';
|
||||
import { posts_func } from '$lib/ae_posts/ae_posts_functions';
|
||||
|
||||
export const load = (async ({ params, parent }) => { // route
|
||||
let log_lvl: number = 1;
|
||||
export const load = (async ({ params, parent }) => {
|
||||
// route
|
||||
const log_lvl: number = 1;
|
||||
|
||||
let data = await parent();
|
||||
data.log_lvl = log_lvl;
|
||||
const data = await parent();
|
||||
data.log_lvl = log_lvl;
|
||||
|
||||
let account_id = data.account_id;
|
||||
let ae_acct = data[account_id];
|
||||
const account_id = data.account_id;
|
||||
const ae_acct = data[account_id];
|
||||
|
||||
if (browser) {
|
||||
let load_post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
api_cfg: ae_acct.api,
|
||||
for_obj_type: 'account',
|
||||
for_obj_id: account_id,
|
||||
// archive_on should be current datetime in ISO format
|
||||
// Date().toISOString()
|
||||
qry_archive_on: '2024-01-01', // (new Date()).toISOString(),
|
||||
inc_comment_li: true,
|
||||
enabled: 'enabled',
|
||||
hidden: 'not_hidden',
|
||||
limit: 19,
|
||||
order_by_li: {'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
if (log_lvl) {
|
||||
console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
}
|
||||
ae_acct.slct.post_obj_li = load_post_obj_li;
|
||||
}
|
||||
if (browser) {
|
||||
const load_post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
api_cfg: ae_acct.api,
|
||||
for_obj_type: 'account',
|
||||
for_obj_id: account_id,
|
||||
// archive_on should be current datetime in ISO format
|
||||
// Date().toISOString()
|
||||
qry_archive_on: '2024-01-01', // (new Date()).toISOString(),
|
||||
inc_comment_li: true,
|
||||
enabled: 'enabled',
|
||||
hidden: 'not_hidden',
|
||||
limit: 19,
|
||||
order_by_li: { updated_on: 'DESC', created_on: 'DESC' },
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
if (log_lvl) {
|
||||
console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
}
|
||||
ae_acct.slct.post_obj_li = load_post_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;
|
||||
|
||||
}) satisfies PageLoad;
|
||||
return data;
|
||||
}) satisfies PageLoad;
|
||||
|
||||
Reference in New Issue
Block a user