At least in JS I think that is idiomatic, it's an option for linting: https://eslint.org/docs/rules/callback-return.