.clinerules 1.3 KB

123456789101112131415161718192021222324252627
  1. # Code Quality Rules
  2. 1. Test Coverage:
  3. - Before attempting completion, always make sure that any code changes have test coverage
  4. - Ensure all tests pass before submitting changes
  5. 2. Lint Rules:
  6. - Never disable any lint rules without explicit user approval
  7. - If a lint rule needs to be disabled, ask the user first and explain why
  8. - Prefer fixing the underlying issue over disabling the lint rule
  9. - Document any approved lint rule disabling with a comment explaining the reason
  10. 3. Logging Guidelines:
  11. - Always instrument code changes using the logger exported from `src\utils\logging\index.ts`.
  12. - This will facilitate efficient debugging without impacting production (as the logger no-ops outside of a test environment.)
  13. - Logs can be found in `logs\app.log`
  14. - Logfile is overwritten on each run to keep it to a manageable volume.
  15. 4. Styling Guidelines:
  16. - Use Tailwind CSS classes instead of inline style objects for new markup
  17. - VSCode CSS variables must be added to webview-ui/src/index.css before using them in Tailwind classes
  18. - Example: `<div className="text-md text-vscode-descriptionForeground mb-2" />` instead of style objects
  19. # Adding a New Setting
  20. To add a new setting that persists its state, follow the steps in cline_docs/settings.md