Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
Enable typescript-eslint/explicit-function-return-type
Browse files Browse the repository at this point in the history
We should annotate types of in/out of functions
because programms are built with a bunch of functions.

It makes type safe world easy to annotate types of in/out of functions.
and we should express the type signature as documentation of their functions.

However, this rule is pretty tired for expressions because we use function expression
as a callback. Let's disable its case.
  • Loading branch information
tetsuharuohzeki committed Mar 6, 2019
1 parent edbb67f commit 99a2f5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/eslintrc_typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ module.exports = {
// A class & interface should be PascalCased
'@typescript-eslint/class-name-casing': 'error',

// TODO: (#64) @typescript-eslint/explicit-function-return-type
// We should annotate the in/out type of functions because programms are built with a bunch of functions.
// It makes type safe world easy and we should express the type signature as documentation of their functions.
'@typescript-eslint/explicit-function-return-type': ['warn', {
// This rule is pretty tired for expressions because we use function expression
// as a callback. Let's disable its case.
'allowExpressions': true,
}],

// It's redundant to enforce to supply `public`.
'@typescript-eslint/explicit-member-accessibility': 'off',
Expand Down

0 comments on commit 99a2f5c

Please sign in to comment.