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 ruleP2stack specificStack: react
reactclean-codeboilerplateconstructors
Remove a constructor that only calls super
Delete constructors that do nothing but forward props to super(); they add noise without behavior.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetsx
| 1 | class CurrencyComponent extends Component<Props> { |
| 2 | constructor(props: Props) { |
| 3 | super(props); |
| 4 | } |
| 5 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetsx
| 1 | class CurrencyComponent extends Component<Props> {} |
Explanation (EN)
Objašnjenje (HR)