UNPKG

eslint-plugin-complete

Version:

An ESLint plugin that contains useful rules.

32 lines 1.18 kB
import type { TSESLint } from "@typescript-eslint/utils"; import { TSESTree } from "@typescript-eslint/utils"; export declare function getLeadingLineComments(sourceCode: TSESLint.SourceCode, comments: readonly TSESTree.Comment[]): readonly TSESTree.Comment[]; /** * An object containing one or more contiguous leading line comments. For example: * * ```ts * // The first line of the block. * // The second line of the block. * ``` */ interface LeadingLineCommentBlock { mergedText: string; originalComments: TSESTree.Comment[]; } /** * Returns an array of grouped comments. For example, the following code would return an array of * three comment blocks: * * ```ts * // This is the first block. * * // This is the second block. * // We are still in the second block, because there has not been a newline separator yet. * * // This is the third block. * ``` */ export declare function getCommentBlocks(comments: readonly TSESTree.Comment[]): readonly LeadingLineCommentBlock[]; export declare function allCommentsInBlockAreCommentedOutArrayElements(commentBlock: LeadingLineCommentBlock): boolean; export {}; //# sourceMappingURL=leadingLineComments.d.ts.map