mediamonks / frontend-coding-standards

Media.Monks - Frontend Coding Standards
60 stars 23 forks source link

Adding a section about return types for TypeScript #75

Closed ThijsTyZ closed 3 years ago

leroykorterink commented 3 years ago

Should we also add this as a rule in the ESLint config?

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md

ThijsTyZ commented 3 years ago

Should we also add this as a rule in the ESLint config?

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md

Adding the return type is only needed for function that are part of the public API, so I think we should not make it mandatory for all functions