Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

chore: enable jsdoc/informative-docs internally #8157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ export default tseslint.config(
// eslint-plugin-unicorn
//

'jsdoc/informative-docs': 'error',
'unicorn/no-typeof-undefined': 'error',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion 2 packages/eslint-plugin/src/rules/member-ordering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
* @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 (-).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ export default createRule<Options, MessageIds>({

/**
* Determines whether a function has a name.
* @param node The function node.
* @returns Whether the function has a name.
*/
function isNamedFunction(
node:
Expand All @@ -95,7 +93,6 @@ export default createRule<Options, MessageIds>({

/**
* Gets the config for a given function
* @param node The function node
*/
function getConfigForFunction(
node:
Expand Down
4 changes: 0 additions & 4 deletions 4 packages/scope-manager/src/definition/DefinitionBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ abstract class DefinitionBase<
*/
public readonly $id: number = generator();

/**
* The type of the definition
* @public
*/
public readonly type: Type;

/**
Expand Down
7 changes: 0 additions & 7 deletions 7 packages/scope-manager/src/scope/ScopeBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ function isStrictScope(
return false;
}

/**
* Register scope
*/
function registerScope(scopeManager: ScopeManager, scope: Scope): void {
scopeManager.scopes.push(scope);

Expand Down Expand Up @@ -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}.
Expand Down
4 changes: 0 additions & 4 deletions 4 packages/typescript-estree/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions 2 packages/typescript-estree/src/node-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion 1 packages/utils/src/eslint-utils/deepMerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ type ObjectLike<T = unknown> = Record<string, T>;

/**
* Check if the variable contains an object strictly rejecting arrays
* @param obj an object
* @returns `true` if obj is an object
*/
function isObjectNotArray<T extends ObjectLike>(obj: unknown): obj is T {
Expand Down
1 change: 0 additions & 1 deletion 1 packages/utils/src/ts-eslint/ESLint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion 1 packages/utils/src/ts-eslint/RuleTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ interface TestCaseError<MessageIds extends string> {

/**
* @param text a string describing the rule
* @param callback the test callback
*/
type RuleTesterTestFrameworkFunction = (
text: string,
Expand Down
5 changes: 0 additions & 5 deletions 5 packages/utils/src/ts-eslint/SourceCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends SourceCode.CursorWithCountOptions>(
node: TSESTree.Node,
Expand Down Expand Up @@ -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<T extends SourceCode.CursorWithCountOptions>(
node: TSESTree.Node,
Expand Down Expand Up @@ -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<T extends SourceCode.CursorWithCountOptions>(
node: TSESTree.Node | TSESTree.Token,
Expand All @@ -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<T extends SourceCode.CursorWithCountOptions>(
node: TSESTree.Node | TSESTree.Token,
Expand All @@ -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);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.