ENG-2059 Refactor existing Roam to CrossApp converter into its own file.#1243
ENG-2059 Refactor existing Roam to CrossApp converter into its own file.#1243maparent wants to merge 1 commit into
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
| text: string; | ||
| node_type_id: string; | ||
| node_title?: string; | ||
| fullText?: string; |
There was a problem hiding this comment.
Rather than add a parameter to the converter, I thought I could add the full text here, as it feels natural for the type.
| export const RoamFullContentNodeToCrossApp = ( | ||
| node: RoamFullContentNode, | ||
| ): CrossAppNode => { |
There was a problem hiding this comment.
🟡 New converter function name does not follow the project's naming convention
The newly added converter function is named starting with an uppercase letter (RoamFullContentNodeToCrossApp at apps/roam/src/utils/roamToCrossAppConverters.ts:5) instead of camelCase as required for functions by the project style guide, so it breaks the repository's mandated naming convention.
Impact: Code diverges from the required style, hurting consistency and maintainability.
Naming convention rule
AGENTS.md mandates "camelCase for variables and functions" and "PascalCase for components and types". RoamFullContentNodeToCrossApp is a plain utility function (not a component or type), so it should be roamFullContentNodeToCrossApp. The import at apps/roam/src/utils/convertRoamNodeToFullContent.ts:9 and usage at line 63 would need to be updated accordingly.
Prompt for agents
The function RoamFullContentNodeToCrossApp in apps/roam/src/utils/roamToCrossAppConverters.ts is a utility function but uses PascalCase, violating the AGENTS.md rule that functions must be camelCase. Rename it to roamFullContentNodeToCrossApp and update its import and usage in apps/roam/src/utils/convertRoamNodeToFullContent.ts (import on line 9, call on line 63).
Was this helpful? React with 👍 or 👎 to provide feedback.
82c5654 to
e02622c
Compare
e02622c to
fc9ebdf
Compare
https://linear.app/discourse-graphs/issue/ENG-2059/refactor-existing-roam-to-crossapp-converter-into-its-own-file
https://www.loom.com/share/d5a6d5b3c60e45ffa8cd3afe5fa14488