pr-review-checklist.mdc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ---
  2. description: PR review output policy and checklist;
  3. alwaysApply: false
  4. ---
  5. # PR Review
  6. ## Instructions
  7. — Only Output Issues/Improvements, DO NOT list all that is already good.
  8. - Be concise.
  9. - Provide a general feedback section for issues spanning multiple files, e.g. architectural.
  10. - Provide a section per file with links to the source files.
  11. ## Always check for
  12. - Architecture: lift/split state; keep components cohesive.
  13. - Naming clarity: components, functions, variables.
  14. - Edge cases: loading/empty/error; network failures.
  15. - Accessibility: roles, labels, focus, contrast. Only comment where needed,
  16. - Check for aria- attributes ONLY when needed. e.g.
  17. - DO: comment if an icon inly button is missing aria-label.
  18. - DON'T: comment about missing aria-disabled if a native disabled attribute is used.
  19. - Copy: concise, consistent; i18n everywhere.
  20. - All files must start with the Cloudera copyright statement
  21. ## Make sure that test files
  22. - test main flows
  23. - use userEvent and avoid fireEvent unless realy needed.
  24. - does not test implementation details; assert on behavior and rendered screens.
  25. - use role/name queries, e.g. getByRole rather than getByText
  26. - uses toBeVisible() instead of toBeInTheDocument() where possible
  27. - use the component name in the describe function
  28. - use "it" function over "test" for better readbility
  29. ## Make sure the style files
  30. - use BEM notation (avoid unnecessary nesting for classes but allow .antd.cuix on the root)
  31. - never use hardcoded colors; use tokens/variables.
  32. - avoid hardcoded variables for positioning/spacing if possible
  33. - do not contain unnused classes
  34. - use classes over HTML elements whenever possible