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 2cef7f8 commit 35d8adc
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: @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 35d8adc

Please sign in to comment.