diff --git a/eslint.config.mjs b/eslint.config.mjs index 2c4bedd9b359..84460be0a90e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -297,6 +297,7 @@ export default tseslint.config( // eslint-plugin-unicorn // + 'jsdoc/informative-docs': 'error', 'unicorn/no-typeof-undefined': 'error', }, }, diff --git a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts index 52a40e2519cf..d55a3ad5fac3 100644 --- a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts +++ b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts @@ -124,10 +124,6 @@ export default createRule({ } } - /** - * Check the body for overload methods. - * @param node the body to be inspected. - */ function checkBodyForOverloadMethods(node: RuleNode): void { const members = getMembers(node); diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 949758785b2b..4b2bb87f5efa 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -630,7 +630,7 @@ function getRank( * public-instance-method. * If a lowest possible rank is a member group, a comma separated list of ranks is returned. * @param ranks the existing ranks in the object. - * @param target the target rank. + * @param target the minimum target rank to filter on. * @param order the current order to be validated. * @returns the name(s) of the lowest possible rank without dashes (-). */ diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index 315d3e80d74d..1e84a836190a 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -123,7 +123,7 @@ function newNodeTypeTester(type: AST_NODE_TYPES): NodeTestObject { /** * Skips a chain expression node * @param node The node to test - * @returnsA non-chain expression + * @returns A non-chain expression * @private */ function skipChainExpression(node: TSESTree.Node): TSESTree.Node { @@ -324,7 +324,6 @@ function isExpression( * ;[1, 2, 3].forEach(bar) * @param node The node to get. * @param sourceCode The source code to get tokens. - * @returns The actual last token. * @private */ function getActualLastToken( diff --git a/packages/eslint-plugin/src/rules/space-before-function-paren.ts b/packages/eslint-plugin/src/rules/space-before-function-paren.ts index 1bde80f3f776..f0d1c6082017 100644 --- a/packages/eslint-plugin/src/rules/space-before-function-paren.ts +++ b/packages/eslint-plugin/src/rules/space-before-function-paren.ts @@ -68,8 +68,6 @@ export default createRule({ /** * Determines whether a function has a name. - * @param node The function node. - * @returns Whether the function has a name. */ function isNamedFunction( node: @@ -95,7 +93,6 @@ export default createRule({ /** * Gets the config for a given function - * @param node The function node */ function getConfigForFunction( node: diff --git a/packages/scope-manager/src/definition/DefinitionBase.ts b/packages/scope-manager/src/definition/DefinitionBase.ts index f382ca303f30..e855a3aa8428 100644 --- a/packages/scope-manager/src/definition/DefinitionBase.ts +++ b/packages/scope-manager/src/definition/DefinitionBase.ts @@ -16,10 +16,6 @@ abstract class DefinitionBase< */ public readonly $id: number = generator(); - /** - * The type of the definition - * @public - */ public readonly type: Type; /** diff --git a/packages/scope-manager/src/scope/ScopeBase.ts b/packages/scope-manager/src/scope/ScopeBase.ts index f5afb3aa4ad9..41df826e8d11 100644 --- a/packages/scope-manager/src/scope/ScopeBase.ts +++ b/packages/scope-manager/src/scope/ScopeBase.ts @@ -107,9 +107,6 @@ function isStrictScope( return false; } -/** - * Register scope - */ function registerScope(scopeManager: ScopeManager, scope: Scope): void { scopeManager.scopes.push(scope); @@ -200,10 +197,6 @@ abstract class ScopeBase< * @public */ public readonly through: Reference[] = []; - /** - * The type of scope - * @public - */ public readonly type: Type; /** * Reference to the parent {@link Scope}. diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 13882d67c9ce..33bfe84ba99c 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -139,8 +139,6 @@ export class Converter { /** * Fixes the exports of the given ts.Node - * @param node the ts.Node - * @param result result * @returns the ESTreeNode with fixed exports */ private fixExports< @@ -750,8 +748,6 @@ export class Converter { * Converts a TypeScript node into an ESTree node. * The core of the conversion logic: * Identify and convert each relevant TypeScript SyntaxKind - * @param node the child ts.Node - * @param parent parentNode * @returns the converted ESTree node */ private convertNode(node: TSNode, parent: TSNode): TSESTree.Node | null { diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index be28c506d959..5dc42f06dbb1 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -83,7 +83,6 @@ type DeclarationKind = TSESTree.VariableDeclaration['kind']; /** * Returns true if the given ts.Token is the assignment operator * @param operator the operator token - * @returns is assignment */ function isAssignmentOperator( operator: ts.BinaryOperatorToken, @@ -188,7 +187,6 @@ export function isComment(node: ts.Node): boolean { /** * Returns true if the given ts.Node is a JSDoc comment * @param node the TypeScript node - * @returns is JSDoc comment */ function isJSDocComment(node: ts.Node): node is ts.JSDoc { // eslint-disable-next-line deprecation/deprecation -- SyntaxKind.JSDoc was only added in TS4.7 so we can't use it yet diff --git a/packages/utils/src/eslint-utils/deepMerge.ts b/packages/utils/src/eslint-utils/deepMerge.ts index 85412ed399db..f6513944c1bd 100644 --- a/packages/utils/src/eslint-utils/deepMerge.ts +++ b/packages/utils/src/eslint-utils/deepMerge.ts @@ -2,7 +2,6 @@ type ObjectLike = Record; /** * Check if the variable contains an object strictly rejecting arrays - * @param obj an object * @returns `true` if obj is an object */ function isObjectNotArray(obj: unknown): obj is T { diff --git a/packages/utils/src/ts-eslint/ESLint.ts b/packages/utils/src/ts-eslint/ESLint.ts index 4eb31dd6e879..b3e829e1ce10 100644 --- a/packages/utils/src/ts-eslint/ESLint.ts +++ b/packages/utils/src/ts-eslint/ESLint.ts @@ -49,7 +49,6 @@ declare class ESLintBase { * options.warnIgnored option is set along with the options.filePath option, this method returns a LintResult object. * In that case, the result may contain a warning that indicates the file was ignored. * @param code The source code text to check. - * @param options The options. * @returns The promise that will be fulfilled with an array of LintResult objects. This is an array (despite there * being only one lint result) in order to keep the interfaces between this and the eslint.lintFiles() * method similar. diff --git a/packages/utils/src/ts-eslint/RuleTester.ts b/packages/utils/src/ts-eslint/RuleTester.ts index 021d2f579218..11696716222f 100644 --- a/packages/utils/src/ts-eslint/RuleTester.ts +++ b/packages/utils/src/ts-eslint/RuleTester.ts @@ -127,7 +127,6 @@ interface TestCaseError { /** * @param text a string describing the rule - * @param callback the test callback */ type RuleTesterTestFrameworkFunction = ( text: string, diff --git a/packages/utils/src/ts-eslint/SourceCode.ts b/packages/utils/src/ts-eslint/SourceCode.ts index 1675832dd2e0..28f37a58ac42 100644 --- a/packages/utils/src/ts-eslint/SourceCode.ts +++ b/packages/utils/src/ts-eslint/SourceCode.ts @@ -65,7 +65,6 @@ declare class TokenStore { * Gets the first `count` tokens of the given node. * @param node The AST node. * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. */ getFirstTokens( node: TSESTree.Node, @@ -109,7 +108,6 @@ declare class TokenStore { * Gets the last `count` tokens of the given node. * @param node The AST node. * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. */ getLastTokens( node: TSESTree.Node, @@ -183,7 +181,6 @@ declare class TokenStore { * Gets the `count` tokens that follows a given node or token. * @param node The AST node. * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. */ getTokensAfter( node: TSESTree.Node | TSESTree.Token, @@ -193,7 +190,6 @@ declare class TokenStore { * Gets the `count` tokens that precedes a given node or token. * @param node The AST node. * @param options The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. - * @returns Tokens. */ getTokensBefore( node: TSESTree.Node | TSESTree.Token, @@ -216,7 +212,6 @@ declare class TokenStore { declare class SourceCodeBase extends TokenStore { /** * Represents parsed source code. - * @param text The source code text. * @param ast The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. */ constructor(text: string, ast: SourceCode.Program);