Skip to content

Commit

Permalink
fix(jsdoc): properly support overloads, disable rule for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GerkinDev committed Jul 30, 2021
1 parent d03934d commit a4308b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config-fragments/ts-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
};
13 changes: 13 additions & 0 deletions src/config-fragments/ts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-len -- long contexts */
export = {
plugins: [
'import',
Expand All @@ -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 */

0 comments on commit a4308b9

Please sign in to comment.