Write code using the shortest, most idiomatic form that remains clear, and stay consistent with the project’s established conventions rather than reverting to verbose patterns. Concretely:
{ path, method, handler } rather than { path: path, method: method, handler: handler }.return opt?.after?.(await res) ?? res instead of multi-branch if/else.if (!x) { return false }) to match the project’s curly lint rule; don’t rely on single-line if statements.switch blocks instead.&&/|| in a single condition, use parentheses to make operator precedence and intent explicit, e.g. contentType !== null && (contentType.startsWith('a') || contentType.startsWith('b')).; only when required to disambiguate a new statement.The goal is code that a reviewer can scan quickly: no redundant boilerplate, no accidental ambiguity from operator precedence or missing braces, and no duplicated logic scattered across a file.