Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2project specificStack: react
reacttypescriptconsistencyconventions
Use the project's standard component type annotation
Annotate components the same way across the codebase (e.g. React.FC) instead of mixing styles, and don't double-annotate destructured props.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetypescript
| 1 | const InstrumentChip: FC<InstrumentChipProps> = ({ name }: InstrumentChipProps) => {}; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | const InstrumentChip: React.FC<InstrumentChipProps> = ({ name }) => {}; |
Explanation (EN)
Objašnjenje (HR)