diff --git a/src/config-fragments/ts-test.ts b/src/config-fragments/ts-test.ts index 332fa44..b694139 100644 --- a/src/config-fragments/ts-test.ts +++ b/src/config-fragments/ts-test.ts @@ -4,5 +4,6 @@ export = { '@typescript-eslint/tslint/config': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', + 'jsdoc/require-jsdoc': 'off', }, }; diff --git a/src/config-fragments/ts.ts b/src/config-fragments/ts.ts index d1f748d..e8df1c6 100644 --- a/src/config-fragments/ts.ts +++ b/src/config-fragments/ts.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-len -- long contexts */ export = { plugins: [ 'import', @@ -16,5 +17,17 @@ export = { 'no-dupe-class-members': 'off', 'import/export': 'off', 'jsdoc/require-param-type': 'off', + 'jsdoc/require-jsdoc': [ 'error', { + contexts: [ + 'ExportNamedDeclaration[declaration.type="TSDeclareFunction"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="TSDeclareFunction"])', + 'ExportNamedDeclaration[declaration.type="FunctionDeclaration"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="FunctionDeclaration"])', + 'MethodDefinition[kind="method"][value.type="TSEmptyBodyFunctionExpression"]:not(MethodDefinition[value.type="TSEmptyBodyFunctionExpression"] + MethodDefinition[value.type="TSEmptyBodyFunctionExpression"])', + 'MethodDefinition[kind="method"][value.type="FunctionExpression"]:not(MethodDefinition[value.type="TSEmptyBodyFunctionExpression"] + MethodDefinition[value.type="FunctionExpression"])', + ], + require: { + FunctionDeclaration: false, + }, + } ], }, } +/* eslint-enable max-len */