|
1 |
| -- use npm run to see what commands are available |
| 1 | +- use `npm run` to see what commands are available |
| 2 | +- For component communication, prefer Vue's event-based pattern (emit/@event-name) for state changes and notifications; use defineExpose with refs only for imperative operations that need direct control (like form.validate(), modal.open(), or editor.focus()); events promote loose coupling and are better for reusable components, while exposed methods are acceptable for tightly-coupled component pairs or when wrapping third-party libraries that require imperative APIs |
2 | 3 | - After making code changes, follow this general process: (1) Create unit tests, component tests, browser tests (if appropriate for each), (2) run unit tests, component tests, and browser tests until passing, (3) run typecheck, lint, format (with prettier) -- you can use `npm run` command to see the scripts available, (4) check if any READMEs (including nested) or documentation needs to be updated, (5) Decide whether the changes are worth adding new content to the external documentation for (or would requires changes to the external documentation) at https://docs.comfy.org, then present your suggestion
|
3 | 4 | - When referencing PrimeVue, you can get all the docs here: https://primevue.org. Do this instead of making up or inferring names of Components
|
4 | 5 | - When trying to set tailwind classes for dark theme, use "dark-theme:" prefix rather than "dark:"
|
5 |
| -- Never add lines to PR descriptions that say "Generated with Claude Code" |
| 6 | +- Never add lines to PR descriptions or commit messages that say "Generated with Claude Code" |
6 | 7 | - When making PR names and commit messages, if you are going to add a prefix like "docs:", "feat:", "bugfix:", use square brackets around the prefix term and do not use a colon (e.g., should be "[docs]" rather than "docs:").
|
7 | 8 | - When I reference GitHub Repos related to Comfy-Org, you should proactively fetch or read the associated information in the repo. To do so, you should exhaust all options: (1) Check if we have a local copy of the repo, (2) Use the GitHub API to fetch the information; you may want to do this IN ADDITION to the other options, especially for reading specific branches/PRs/comments/reviews/metadata, and (3) curl the GitHub website and parse the html or json responses
|
8 | 9 | - For information about ComfyUI, ComfyUI_frontend, or ComfyUI-Manager, you can web search or download these wikis: https://deepwiki.com/Comfy-Org/ComfyUI-Manager, https://deepwiki.com/Comfy-Org/ComfyUI_frontend/1-overview, https://deepwiki.com/comfyanonymous/ComfyUI/2-core-architecture
|
|
17 | 18 | - Use the Vue 3 Composition API instead of the Options API when writing Vue components. An exception is when overriding or extending a PrimeVue component for compatibility, you may use the Options API.
|
18 | 19 | - when we are solving an issue we know the link/number for, we should add "Fixes #n" (where n is the issue number) to the PR description.
|
19 | 20 | - Never write css if you can accomplish the same thing with tailwind utility classes
|
20 |
| -- Use setup() function for component logic |
21 | 21 | - Utilize ref and reactive for reactive state
|
22 | 22 | - Implement computed properties with computed()
|
23 | 23 | - Use watch and watchEffect for side effects
|
|
27 | 27 | - Use Tailwind CSS for styling
|
28 | 28 | - Leverage VueUse functions for performance-enhancing styles
|
29 | 29 | - Use lodash for utility functions
|
30 |
| -- Use TypeScript for type safety |
31 | 30 | - Implement proper props and emits definitions
|
32 | 31 | - Utilize Vue 3's Teleport component when needed
|
33 | 32 | - Use Suspense for async components
|
34 | 33 | - Implement proper error handling
|
35 | 34 | - Follow Vue 3 style guide and naming conventions
|
36 |
| -- Use Vite for fast development and building |
37 | 35 | - Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json.
|
38 | 36 | - Avoid using `@ts-expect-error` to work around type issues. We needed to employ it to migrate to TypeScript, but it should not be viewed as an accepted practice or standard.
|
39 | 37 | - DO NOT use deprecated PrimeVue components. Use these replacements instead:
|
|
0 commit comments