8000 chore: enable jsdoc/informative-docs internally (#8157) · yeonjuan/typescript-eslint@aeb2f71 · GitHub
[go: up one dir, main page]

Skip to content

Commit aeb2f71

Browse files
chore: enable jsdoc/informative-docs internally (typescript-eslint#8157)
* chore: enable jsdoc/informative-docs internally * Review suggestions
1 parent 88b7463 commit aeb2f71

File tree

13 files changed

+3
-35
lines changed

13 files changed

+3
-35
lines changed

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ export default tseslint.config(
297297
// eslint-plugin-unicorn
298298
//
299299

300+
'jsdoc/informative-docs': 'error',
300301
'unicorn/no-typeof-undefined': 'error',
301302
},
302303
},

packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ export default createRule({
124124
}
125125
}
126126

127-
/**
128-
* Check the body for overload methods.
129-
* @param node the body to be inspected.
130-
*/
131127
function checkBodyForOverloadMethods(node: RuleNode): void {
132128
const members = getMembers(node);
133129

packages/eslint-plugin/src/rules/member-ordering.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ function getRank(
630630
* public-instance-method.
631631
* If a lowest possible rank is a member group, a comma separated list of ranks is returned.
632632
* @param ranks the existing ranks in the object.
633-
* @param target the target rank.
633+
* @param target the minimum target rank to filter on.
634634
* @param order the current order to be validated.
635635
* @returns the name(s) of the lowest possible rank without dashes (-).
636636
*/

packages/eslint-plugin/src/rules/padding-line-between-statements.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function newNodeTypeTester(type: AST_NODE_TYPES): NodeTestObject {
123123
/**
124124
* Skips a chain expression node
125125
* @param node The node to test
126-
* @returnsA non-chain expression
126+
* @returns A non-chain expression
127127
* @private
128128
*/
129129
function skipChainExpression(node: TSESTree.Node): TSESTree.Node {
@@ -324,7 +324,6 @@ function isExpression(
324324
* ;[1, 2, 3].forEach(bar)
325325
* @param node The node to get.
326326
* @param sourceCode The source code to get tokens.
327-
* @returns The actual last token.
328327
* @private
329328
*/
330329
function getActualLastToken(

packages/eslint-plugin/src/rules/space-before-function-paren.ts

Lines changed: 0 additions & 3 deletions
98
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ export default createRule<Options, MessageIds>({
6868

6969
/**
7070
* Determines whether a function has a name.
71-
* @param node The function node.
72-
* @returns Whether the function has a name.
7371
*/
7472
function isNamedFunction(
7573
node:
@@ -95,7 +93,6 @@ export default createRule<Options, MessageIds>({
9593

9694
/**
9795
* Gets the config for a given function
98-
* @param node The function node
9996
*/
10097
function getConfigForFunction(
101
node:

packages/scope-manager/src/definition/DefinitionBase.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ abstract class DefinitionBase<
1616
*/
1717
public readonly $id: number = generator();
1818

19-
/**
20-
* The type of the definition
21-
* @public
22-
*/
2319
public readonly type: Type;
2420

2521
/**

packages/scope-manager/src/scope/ScopeBase.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ function isStrictScope(
107107
return false;
108108
}
109109

110-
/**
111-
* Register scope
112-
*/
113110
function registerScope(scopeManager: ScopeManager, scope: Scope): void {
114111
scopeManager.scopes.push(scope);
115112

@@ -200,10 +197,6 @@ abstract class ScopeBase<
200197
* @public
201198
*/
202199
public readonly through: Reference[] = [];
203-
/**
204-
* The type of scope
205-
* @public
206-
*/
207200
public readonly type: Type;
208201
/**
209202
* Reference to the parent {@link Scope}.

packages/typescript-estree/src/convert.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ export class Converter {
139139

140140
/**
141141
* Fixes the exports of the given ts.Node
142-
* @param node the ts.Node
143-
* @param result result
144142
* @returns the ESTreeNode with fixed exports
145143
*/
146144
private fixExports<
@@ -750,8 +748,6 @@ export class Converter {
750748
* Converts a TypeScript node into an ESTree node.
751749
* The core of the conversion logic:
752750
* Identify and convert each relevant TypeScript SyntaxKind
753-
* @param node the child ts.Node
754-
* @param parent parentNode
755751
* @returns the converted ESTree node
756752
*/
757753
private convertNode(node: TSNode, parent: TSNode): TSESTree.Node | null {

packages/typescript-estree/src/node-utils.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ type DeclarationKind = TSESTree.VariableDeclaration['kind'];
8383
/**
8484
* Returns true if the given ts.Token is the assignment operator
8585
* @param operator the operator token
86-
* @returns is assignment
8786
*/
8887
function isAssignmentOperator(
8988
operator: ts.BinaryOperatorToken,
@@ -188,7 +187,6 @@ export function isComment(node: ts.Node): boolean {
188187
/**
189188
* Returns true if the given ts.Node is a JSDoc comment
190189
* @param node the TypeScript node
191-
* @returns is JSDoc comment
192190
*/
193191
function isJSDocComment(node: ts.Node): node is ts.JSDoc {
194192
// eslint-disable-next-line deprecation/deprecation -- SyntaxKind.JSDoc was only added in TS4.7 so we can't use it yet

packages/utils/src/eslint-utils/deepMerge.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ type ObjectLike<T = unknown> = Record<string, T>;
22

33
/**
44
* Check if the variable contains an object strictly rejecting arrays
5-
* @param obj an object
65
* @returns `true` if obj is an object
76
*/
87
function isObjectNotArray<T extends ObjectLike>(obj: unknown): obj is T {

0 commit comments

Comments
 (0)
0