Skip to content

Commit a28cbda

Browse files
committed
fix: add explicitReturnTypes option
1 parent 5ffb1c3 commit a28cbda

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/configs/typescript.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const typescriptConfig = async ({
4242
'@typescript-eslint/consistent-type-assertions': 'error',
4343
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
4444
'@typescript-eslint/dot-notation': 'error',
45+
'@typescript-eslint/explicit-function-return-type': typescript.explicitReturnTypes ? 'error' : 'off',
4546
'@typescript-eslint/no-array-constructor': 'error',
4647
'@typescript-eslint/no-array-delete': 'error',
4748
'@typescript-eslint/no-base-to-string': 'error',
@@ -139,6 +140,7 @@ export const typescriptConfig = async ({
139140
{
140141
files: filesFactory(testFiles, fileRoots),
141142
rules: {
143+
'@typescript-eslint/explicit-function-return-type': 'off',
142144
'@typescript-eslint/no-unsafe-argument': 'off',
143145
'@typescript-eslint/no-unsafe-assignment': 'off',
144146
'@typescript-eslint/no-unsafe-call': 'off',

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export type Options = {
4040
};
4141
typescript?: {
4242
enabled: boolean;
43+
explicitReturnTypes?: boolean;
4344
project?: string;
4445
};
4546
};

0 commit comments

Comments
 (0)