style: Apply Prettier formatting with 4-space indentation
Applied consistent code formatting across the project using Prettier, now configured to use 4-space indentation instead of tabs.
This commit is contained in:
@@ -13,46 +13,46 @@
|
||||
- **Database Definition Files:** `db_<module>.ts` (e.g., `db_core.ts`, `db_journals.ts`)
|
||||
- **Svelte Store Files:** `ae_<module>_stores.ts` (e.g., `ae_core_stores.ts`, `ae_journals_stores.ts`)
|
||||
- **Svelte Components:**
|
||||
- **Module-specific components:** `ae_comp__<module>__<component_name>.svelte` (e.g., `ae_comp__events__event_card.svelte`)
|
||||
- **Generic/reusable components:** `element_<component_name>.svelte` (e.g., `element_input_file.svelte`, `element_qr_scanner_v2.svelte`)
|
||||
- **Module-specific components:** `ae_comp__<module>__<component_name>.svelte` (e.g., `ae_comp__events__event_card.svelte`)
|
||||
- **Generic/reusable components:** `element_<component_name>.svelte` (e.g., `element_input_file.svelte`, `element_qr_scanner_v2.svelte`)
|
||||
- **SvelteKit Routes:** Follow SvelteKit's standard routing conventions (e.g., `+page.svelte`, `+layout.svelte`, `[id]/+page.svelte`).
|
||||
- **CSS Files:** `ae-<module>-<purpose>.css` (e.g., `ae-c-idaa-light.css`, `ae-osit-default.css`)
|
||||
|
||||
## 3. Function and Variable Naming
|
||||
|
||||
- **Style:** Strictly `snake_case` for all function and variable names.
|
||||
- **Deprecated:** `camelCase` should be refactored to `snake_case`.
|
||||
- **Deprecated:** `camelCase` should be refactored to `snake_case`.
|
||||
- **Prefixes:**
|
||||
- `load_ae_obj_id__<object_type>`: For loading a single Aether object by ID.
|
||||
- `load_ae_obj_li__<object_type>`: For loading a list of Aether objects.
|
||||
- `create_ae_obj__<object_type>`: For creating an Aether object.
|
||||
- `update_ae_obj__<object_type>`: For updating an Aether object.
|
||||
- `delete_ae_obj_id__<object_type>`: For deleting an Aether object by ID.
|
||||
- `db_save_ae_obj_li__<object_type>`: For saving a list of Aether objects to IndexedDB.
|
||||
- `db_update_ae_obj_id__<object_type>`: For updating an Aether object in IndexedDB.
|
||||
- `process_ae_obj__<object_type>_props`: For module-specific data transformation functions.
|
||||
- **Deprecated:** Ambiguous `handle_` prefixes should be replaced with more descriptive `snake_case` names (e.g., `handle_submit_form` -> `submit_form`).
|
||||
- `load_ae_obj_id__<object_type>`: For loading a single Aether object by ID.
|
||||
- `load_ae_obj_li__<object_type>`: For loading a list of Aether objects.
|
||||
- `create_ae_obj__<object_type>`: For creating an Aether object.
|
||||
- `update_ae_obj__<object_type>`: For updating an Aether object.
|
||||
- `delete_ae_obj_id__<object_type>`: For deleting an Aether object by ID.
|
||||
- `db_save_ae_obj_li__<object_type>`: For saving a list of Aether objects to IndexedDB.
|
||||
- `db_update_ae_obj_id__<object_type>`: For updating an Aether object in IndexedDB.
|
||||
- `process_ae_obj__<object_type>_props`: For module-specific data transformation functions.
|
||||
- **Deprecated:** Ambiguous `handle_` prefixes should be replaced with more descriptive `snake_case` names (e.g., `handle_submit_form` -> `submit_form`).
|
||||
|
||||
## 4. Object and Property Naming
|
||||
|
||||
- **Singularity:** Use singular nouns for objects and properties (e.g., `example.id`, not `examples.id`).
|
||||
- **IDs:**
|
||||
- `id`: Primary key for an object (internal use, often a UUID).
|
||||
- `<object_type>_id`: Specific ID for an object (e.g., `person_id`).
|
||||
- `<object_type>_id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters).
|
||||
- `account_id`, `site_id`, `user_id`, etc.: Foreign keys.
|
||||
- `id`: Primary key for an object (internal use, often a UUID).
|
||||
- `<object_type>_id`: Specific ID for an object (e.g., `person_id`).
|
||||
- `<object_type>_id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters).
|
||||
- `account_id`, `site_id`, `user_id`, etc.: Foreign keys.
|
||||
- **Common Properties:**
|
||||
- `code`: Short, unique identifier.
|
||||
- `name`: Display name.
|
||||
- `description`: Longer text description.
|
||||
- `enable`: Boolean for active/inactive status.
|
||||
- `hide`: Boolean for visibility.
|
||||
- `priority`: Numeric value for ordering.
|
||||
- `sort`: Numeric value for ordering.
|
||||
- `group`: Categorization string.
|
||||
- `notes`: General notes/comments.
|
||||
- `created_on`: Timestamp of creation.
|
||||
- `updated_on`: Timestamp of last update.
|
||||
- `code`: Short, unique identifier.
|
||||
- `name`: Display name.
|
||||
- `description`: Longer text description.
|
||||
- `enable`: Boolean for active/inactive status.
|
||||
- `hide`: Boolean for visibility.
|
||||
- `priority`: Numeric value for ordering.
|
||||
- `sort`: Numeric value for ordering.
|
||||
- `group`: Categorization string.
|
||||
- `notes`: General notes/comments.
|
||||
- `created_on`: Timestamp of creation.
|
||||
- `updated_on`: Timestamp of last update.
|
||||
- **Special Use Properties:** `for_type`, `for_id`, `archive_on`, `passcode`, `external_id`.
|
||||
- **Config/JSON Properties:** `cfg_json`, `data_json`, `linked_li_json`.
|
||||
- **Special Generated Fields (Client-side):** `tmp_sort_1`, `tmp_sort_2`, `tmp_sort_3` (for client-side sorting).
|
||||
@@ -82,12 +82,12 @@
|
||||
## 10. Local Storage and IndexedDB Keys
|
||||
|
||||
- **Local Storage:**
|
||||
- `api`
|
||||
- `app` (global)
|
||||
- `core` (core modules)
|
||||
- `<module>` (extended modules)
|
||||
- `<custom>` (custom modules)
|
||||
- `api`
|
||||
- `app` (global)
|
||||
- `core` (core modules)
|
||||
- `<module>` (extended modules)
|
||||
- `<custom>` (custom modules)
|
||||
- **IndexedDB:**
|
||||
- `ae_core_db`
|
||||
- `<module>`
|
||||
- `<custom>`
|
||||
- `ae_core_db`
|
||||
- `<module>`
|
||||
- `<custom>`
|
||||
|
||||
Reference in New Issue
Block a user