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,68 +1,86 @@
|
||||
# AE Svelte and SvelteKit Technical Standards
|
||||
|
||||
## Official Modules
|
||||
|
||||
### Core
|
||||
* Accounts - Minimal
|
||||
* Files
|
||||
* People - Minimal
|
||||
* Sites - Minimal
|
||||
* Users - Minimal
|
||||
|
||||
- Accounts - Minimal
|
||||
- Files
|
||||
- People - Minimal
|
||||
- Sites - Minimal
|
||||
- Users - Minimal
|
||||
|
||||
### Extended
|
||||
|
||||
Archives - Minimal, Events - Badges, Events - Presentation Management, Posts - Minimal, Journals
|
||||
|
||||
### Custom
|
||||
|
||||
IDAA - Archives, IDAA - BB, IDAA - Recovery Meetings
|
||||
|
||||
---
|
||||
|
||||
## localStorage:
|
||||
* api
|
||||
* app - global
|
||||
* core - core modules
|
||||
* [module] - extended modules
|
||||
* [custom] - custom modules
|
||||
|
||||
- api
|
||||
- app - global
|
||||
- core - core modules
|
||||
- [module] - extended modules
|
||||
- [custom] - custom modules
|
||||
|
||||
---
|
||||
|
||||
## Indexed DB
|
||||
* ae_core_db
|
||||
* [module]
|
||||
* [custom] - custom modules: none currently
|
||||
|
||||
- ae_core_db
|
||||
- [module]
|
||||
- [custom] - custom modules: none currently
|
||||
|
||||
---
|
||||
|
||||
## Data Sorting
|
||||
* group > priority > sort > updated/created on
|
||||
* type > start date/time > code or name
|
||||
|
||||
- group > priority > sort > updated/created on
|
||||
- type > start date/time > code or name
|
||||
|
||||
---
|
||||
|
||||
## Objects
|
||||
|
||||
### Function - Obj Prop Update
|
||||
* obj_type
|
||||
* obj_id
|
||||
* obj_prop
|
||||
* obj_value
|
||||
|
||||
- obj_type
|
||||
- obj_id
|
||||
- obj_prop
|
||||
- obj_value
|
||||
|
||||
### Core
|
||||
|
||||
### Extended
|
||||
|
||||
### Custom
|
||||
|
||||
---
|
||||
|
||||
## Object Properties or Fields
|
||||
|
||||
### Core
|
||||
Expected standard field names: id, id_random, [obj-type]_id_random, code, name, enable, hide, priority, sort, group, notes, created_on, updated_on
|
||||
|
||||
Expected standard field names: id, id_random, [obj-type]\_id_random, code, name, enable, hide, priority, sort, group, notes, created_on, updated_on
|
||||
Special use field names: for_type, for_id, archive_on, passcode, external_id
|
||||
|
||||
### Configs and Fields with JSON
|
||||
* cfg_json
|
||||
* data_json
|
||||
* linked_li_json
|
||||
|
||||
- cfg_json
|
||||
- data_json
|
||||
- linked_li_json
|
||||
|
||||
### Special Generated Fields
|
||||
|
||||
tmp_sort_1, tmp_sort_2,
|
||||
|
||||
|
||||
### Future standard fields!!!
|
||||
|
||||
obj_id?: null|string;
|
||||
obj_ext_uid?: null|string; // Probably not needed for journals
|
||||
obj_ext_id?: null|string; // Probably not needed for journals
|
||||
@@ -89,59 +107,65 @@ obj_created_on?: Date;
|
||||
obj_updated_on?: null|Date;
|
||||
|
||||
## Dixie IDB liveQuery with Select Objects (slct) and Lists of Objects (slct_x_li)
|
||||
Use this method below to create a read/write snapshot of the current liveQuery results. This allows you to use it as part of a form and binding values. It might make since to call this something like "lqw__x_obj" and "lqw__x_obj_li". lqw = liveQuery writable
|
||||
|
||||
lq__xyz_obj - Use for general read only
|
||||
lqw__xyz_obj - Use for forms and binding values. What happens if the actual LQ obj is updated after the bind?
|
||||
Use this method below to create a read/write snapshot of the current liveQuery results. This allows you to use it as part of a form and binding values. It might make since to call this something like "lqw**x_obj" and "lqw**x_obj_li". lqw = liveQuery writable
|
||||
|
||||
lq**xyz_obj - Use for general read only
|
||||
lqw**xyz_obj - Use for forms and binding values. What happens if the actual LQ obj is updated after the bind?
|
||||
$slct or $lqw ?
|
||||
|
||||
|
||||
Sort of related.... more permission/security though: Create a new table that will be attached to every v_ view in the DB. This new table would be a field permission list. It could work similar to the data_store table and related view. This seems like a good idea????? 2025-08-11
|
||||
Sort of related.... more permission/security though: Create a new table that will be attached to every v\_ view in the DB. This new table would be a field permission list. It could work similar to the data_store table and related view. This seems like a good idea????? 2025-08-11
|
||||
|
||||
```ts
|
||||
let lq__post_obj = $derived(liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`lq__post_obj: post_id = ${$idaa_slct?.post_id}`);
|
||||
}
|
||||
let results = await db_posts.post
|
||||
.get($idaa_slct.post_id ?? ''); // null or undefined does not reset things like '' does
|
||||
let lq__post_obj = $derived(
|
||||
liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`lq__post_obj: post_id = ${$idaa_slct?.post_id}`);
|
||||
}
|
||||
let results = await db_posts.post.get($idaa_slct.post_id ?? ''); // null or undefined does not reset things like '' does
|
||||
|
||||
// Check if results are different than the current $idaa_slct.post_obj
|
||||
if ($idaa_slct.post_obj && results) {
|
||||
if (JSON.stringify($idaa_slct.post_obj) !== JSON.stringify(results)) {
|
||||
$idaa_slct.post_obj = { ...results};
|
||||
if (log_lvl) {
|
||||
console.log(`$idaa_slct.post_obj = `, $idaa_slct.post_obj);
|
||||
}
|
||||
} else {
|
||||
if (log_lvl) {
|
||||
console.log(`Post object has not changed for post_id: ${$idaa_slct.post_id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check if results are different than the current $idaa_slct.post_obj
|
||||
if ($idaa_slct.post_obj && results) {
|
||||
if (JSON.stringify($idaa_slct.post_obj) !== JSON.stringify(results)) {
|
||||
$idaa_slct.post_obj = { ...results };
|
||||
if (log_lvl) {
|
||||
console.log(`$idaa_slct.post_obj = `, $idaa_slct.post_obj);
|
||||
}
|
||||
} else {
|
||||
if (log_lvl) {
|
||||
console.log(`Post object has not changed for post_id: ${$idaa_slct.post_id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}));
|
||||
return results;
|
||||
})
|
||||
);
|
||||
|
||||
let lq__post_comment_obj_li = $derived(liveQuery(async () => {
|
||||
let results = await db_posts.comment
|
||||
.where('post_id')
|
||||
.equals($idaa_slct.post_id ?? '') // null or undefined does not reset things like '' does
|
||||
.reverse()
|
||||
.sortBy('updated_on');
|
||||
// .sortBy('title');
|
||||
let lq__post_comment_obj_li = $derived(
|
||||
liveQuery(async () => {
|
||||
let results = await db_posts.comment
|
||||
.where('post_id')
|
||||
.equals($idaa_slct.post_id ?? '') // null or undefined does not reset things like '' does
|
||||
.reverse()
|
||||
.sortBy('updated_on');
|
||||
// .sortBy('title');
|
||||
|
||||
if ($idaa_slct.post_comment_obj_li && JSON.stringify($idaa_slct.post_comment_obj_li) !== JSON.stringify(results)) {
|
||||
$idaa_slct.post_comment_obj_li = [...results];
|
||||
if (log_lvl) {
|
||||
console.log(`$idaa_slct.post_comment_obj_li = `, $idaa_slct.post_comment_obj_li);
|
||||
}
|
||||
} else {
|
||||
if (log_lvl) {
|
||||
console.log(`Post comment object list has not changed for post_id: ${$idaa_slct.post_id}`);
|
||||
}
|
||||
}
|
||||
if (
|
||||
$idaa_slct.post_comment_obj_li &&
|
||||
JSON.stringify($idaa_slct.post_comment_obj_li) !== JSON.stringify(results)
|
||||
) {
|
||||
$idaa_slct.post_comment_obj_li = [...results];
|
||||
if (log_lvl) {
|
||||
console.log(`$idaa_slct.post_comment_obj_li = `, $idaa_slct.post_comment_obj_li);
|
||||
}
|
||||
} else {
|
||||
if (log_lvl) {
|
||||
console.log(`Post comment object list has not changed for post_id: ${$idaa_slct.post_id}`);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}));
|
||||
```
|
||||
return results;
|
||||
})
|
||||
);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user