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: Next.js
next.jsexportslinting
Prefer a named noop over an anonymous default export
When a framework requires a default export you don't otherwise need, export a named empty function instead of an anonymous arrow to satisfy lint without a disable comment.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codets
| 1 | // oxlint-disable-next-line import/no-anonymous-default-export |
| 2 | export default () => {}; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | export default function noop() {} |
Explanation (EN)
Objašnjenje (HR)