.agents/skills/frontend-code-review/references/code-quality.md
Flag changes that expand beyond the requested feature or review scope:
Flag:
any or broad Record<string, any> where generated/API types or local domain types exist.string | string[] | undefined deep into components.Prefer:
Flag:
.css files or component CSS imported through globals.css; use scoped *.module.css only when Tailwind and component variants cannot express the style.! important modifiers or important CSS overrides without a narrow, documented reason..join(' '), or custom ternaries for conditional or multi-line classes.data-* selectors.className placed before default classes in cn(...), preventing call-site overrides.Use:
cn(...) from the local package or utility already used by the file.data-disabled:*, data-checked:*, data-highlighted:*, group-data-*, peer-data-*, and has-[:focus-visible] before adding React state or boolean props solely for styling.! overrides. Use ! only for a contained compatibility override that cannot be expressed through the component API or local selector structure.Flag:
@langgenius/dify-ui; consumers must use subpath exports.@/app/components/base/modal, dialog, or drawer.Flag:
web/.Continue where the action is specific.Use feature-local translation keys by default. Alias only when crossing namespaces. pnpm i18n:check --file <name> should pass for any touched translation namespace.