Website Structure

This commit is contained in:
supalerk-ar66 2026-01-13 10:46:40 +07:00
parent 62812f2090
commit 71f0676a62
22365 changed files with 4265753 additions and 791 deletions

View file

@ -0,0 +1,16 @@
export default WarnSettings;
declare function WarnSettings(): {
/**
* Warn only once for each context and setting
* @param {import('eslint').Rule.RuleContext} context
* @param {string} setting
* @returns {boolean}
*/
hasBeenWarned(context: import("eslint").Rule.RuleContext, setting: string): boolean;
/**
* @param {import('eslint').Rule.RuleContext} context
* @param {string} setting
* @returns {void}
*/
markSettingAsWarned(context: import("eslint").Rule.RuleContext, setting: string): void;
};

View file

@ -0,0 +1,33 @@
export default alignTransform;
export type TypelessInfo = {
hasNoTypes: boolean;
maxNamedTagLength: import("./iterateJsdoc.js").Integer;
maxUnnamedTagLength: import("./iterateJsdoc.js").Integer;
};
export type Width = {
name: import("./iterateJsdoc.js").Integer;
start: import("./iterateJsdoc.js").Integer;
tag: import("./iterateJsdoc.js").Integer;
type: import("./iterateJsdoc.js").Integer;
};
/**
* @param {{
* customSpacings: import('../src/rules/checkLineAlignment.js').CustomSpacings,
* tags: string[],
* indent: string,
* preserveMainDescriptionPostDelimiter: boolean,
* wrapIndent: string,
* disableWrapIndent: boolean,
* }} cfg
* @returns {(
* block: import('comment-parser').Block
* ) => import('comment-parser').Block}
*/
declare function alignTransform({ customSpacings, disableWrapIndent, indent, preserveMainDescriptionPostDelimiter, tags, wrapIndent, }: {
customSpacings: import("../src/rules/checkLineAlignment.js").CustomSpacings;
tags: string[];
indent: string;
preserveMainDescriptionPostDelimiter: boolean;
wrapIndent: string;
disableWrapIndent: boolean;
}): (block: import("comment-parser").Block) => import("comment-parser").Block;

View file

@ -0,0 +1,14 @@
export function buildForbidRuleDefinition({ contextName, contexts: cntxts, description, getContexts, modifyContext, schema, url, }: {
contexts?: Contexts;
description?: string;
getContexts?: (ctxt: import("eslint").Rule.RuleContext, report: import("./iterateJsdoc.js").Report) => Contexts | false;
contextName?: string;
modifyContext?: (context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleContext;
schema?: import("eslint").Rule.RuleMetaData["schema"];
url?: string;
}): import("eslint").Rule.RuleModule;
export type Contexts = (string | {
comment: string;
context: string;
message?: string;
})[];

View file

@ -0,0 +1,8 @@
export function buildRejectOrPreferRuleDefinition({ checkNativeTypes, typeName, description, overrideSettings, schema, url, }: {
checkNativeTypes?: import("./rules/checkTypes.js").CheckNativeTypes | null;
overrideSettings?: import("./iterateJsdoc.js").Settings["preferredTypes"] | null;
description?: string;
schema?: import("eslint").Rule.RuleMetaData["schema"];
typeName?: string;
url?: string;
}): import("eslint").Rule.RuleModule;

View file

@ -0,0 +1,4 @@
export default defaultTagOrder;
declare const defaultTagOrder: {
tags: string[];
}[];

View file

@ -0,0 +1,40 @@
declare namespace _default {
export { isUncommentedExport };
export { parse };
}
export default _default;
export type ValueObject = {
value: string;
};
export type CreatedNode = {
type?: string;
value?: ValueObject | import("eslint").Rule.Node | import("@typescript-eslint/types").TSESTree.Node;
props: {
[key: string]: CreatedNode | null;
};
special?: true;
globalVars?: CreatedNode;
exported?: boolean;
ANONYMOUS_DEFAULT?: import("eslint").Rule.Node;
};
export type CreateSymbol = (node: import("eslint").Rule.Node | null, globals: CreatedNode, value: import("eslint").Rule.Node | import("@typescript-eslint/types").TSESTree.Node | null, scope?: CreatedNode | undefined, isGlobal?: boolean | SymbolOptions | undefined) => CreatedNode | null;
export type SymbolOptions = {
simpleIdentifier?: boolean;
};
/**
*
* @param {import('eslint').Rule.Node} node
* @param {import('eslint').SourceCode} sourceCode
* @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt
* @param {import('./iterateJsdoc.js').Settings} settings
* @returns {boolean}
*/
declare function isUncommentedExport(node: import("eslint").Rule.Node, sourceCode: import("eslint").SourceCode, opt: import("./rules/requireJsdoc.js").RequireJsdocOpts, settings: import("./iterateJsdoc.js").Settings): boolean;
/**
*
* @param {import('eslint').Rule.Node} ast
* @param {import('eslint').Rule.Node} node
* @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt
* @returns {CreatedNode}
*/
declare function parse(ast: import("eslint").Rule.Node, node: import("eslint").Rule.Node, opt: import("./rules/requireJsdoc.js").RequireJsdocOpts): CreatedNode;

View file

@ -0,0 +1,10 @@
export default getDefaultTagStructureForMode;
export type TagStructure = Map<string, Map<string, (string | boolean)>>;
/**
* @typedef {Map<string, Map<string, (string|boolean)>>} TagStructure
*/
/**
* @param {import('./jsdocUtils.js').ParserMode} mode
* @returns {TagStructure}
*/
declare function getDefaultTagStructureForMode(mode: import("./jsdocUtils.js").ParserMode): TagStructure;

View file

@ -0,0 +1,5 @@
import { getJsdocProcessorPlugin } from './getJsdocProcessorPlugin.js';
declare const _default: {
getJsdocProcessorPlugin: typeof getJsdocProcessorPlugin;
};
export = _default;

View file

@ -0,0 +1,66 @@
export function getJsdocProcessorPlugin(options?: JsdocProcessorOptions): ESLint.Plugin;
export type Integer = number;
export type JsdocProcessorOptions = {
/**
* Require captions for example tags
*/
captionRequired?: boolean | undefined;
/**
* See docs
*/
paddedIndent?: number | undefined;
/**
* See docs
*/
checkDefaults?: boolean | undefined;
/**
* See docs
*/
checkParams?: boolean | undefined;
/**
* See docs
*/
checkExamples?: boolean | undefined;
/**
* See docs
*/
checkProperties?: boolean | undefined;
/**
* See docs
*/
matchingFileName?: string | undefined;
/**
* See docs
*/
matchingFileNameDefaults?: string | undefined;
/**
* See docs
*/
matchingFileNameParams?: string | undefined;
/**
* See docs
*/
matchingFileNameProperties?: string | undefined;
/**
* See docs
*/
exampleCodeRegex?: string | RegExp | undefined;
/**
* See docs
*/
rejectExampleCodeRegex?: string | RegExp | undefined;
/**
* See docs
*/
allowedLanguagesToProcess?: string[] | undefined;
/**
* See docs
*/
sourceType?: "module" | "script" | undefined;
/**
* See docs
*/
parser?: Linter.ESTreeParser | Linter.NonESTreeParser | undefined;
};
import type { ESLint } from 'eslint';
import type { Linter } from 'eslint';

View file

@ -0,0 +1,23 @@
export default index;
export type ConfigGroups = "recommended" | "stylistic" | "contents" | "logical" | "requirements";
export type ConfigVariants = "" | "-typescript" | "-typescript-flavor";
export type ErrorLevelVariants = "" | "-error";
/**
* @typedef {"recommended" | "stylistic" | "contents" | "logical" | "requirements"} ConfigGroups
* @typedef {"" | "-typescript" | "-typescript-flavor"} ConfigVariants
* @typedef {"" | "-error"} ErrorLevelVariants
* @type {import('eslint').ESLint.Plugin & {
* configs: Record<
* `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
* import('eslint').Linter.Config
* > &
* Record<
* "examples"|"default-expressions"|"examples-and-default-expressions",
* import('eslint').Linter.Config[]
* > &
* Record<"flat/recommended-mixed", import('eslint').Linter.Config[]>
* }}
*/
declare const index: import("eslint").ESLint.Plugin & {
configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config> & Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]> & Record<"flat/recommended-mixed", import("eslint").Linter.Config[]>;
};

View file

@ -0,0 +1,2 @@
import items from './index-cjs.js';
export = items;

View file

@ -0,0 +1,7 @@
import iterateJsdoc, { getSettings, parseComment } from './iterateJsdoc.js';
declare const _default: {
default: typeof iterateJsdoc;
getSettings: typeof getSettings;
parseComment: typeof parseComment;
};
export = _default;

View file

@ -0,0 +1,491 @@
/**
* @param {JsdocVisitor} iterator
* @param {RuleConfig} ruleConfig
* @returns {import('eslint').Rule.RuleModule}
*/
export default function iterateJsdoc(iterator: JsdocVisitor, ruleConfig: RuleConfig): import("eslint").Rule.RuleModule;
export { parseComment } from "@es-joy/jsdoccomment";
export type Integer = number;
export type JsdocBlockWithInline = import("@es-joy/jsdoccomment").JsdocBlockWithInline;
export type ContextObject = {
disallowName?: string;
allowName?: string;
context?: string;
comment?: string;
tags?: string[];
replacement?: string;
minimum?: Integer;
message?: string;
forceRequireReturn?: boolean;
};
export type Context = string | ContextObject;
export type CheckJsdoc = (info: {
lastIndex?: Integer;
isFunctionContext?: boolean;
selector?: string;
comment?: string;
}, handler: null | ((jsdoc: import("@es-joy/jsdoccomment").JsdocBlockWithInline) => boolean | undefined), node: import("eslint").Rule.Node) => void;
export type ForEachPreferredTag = (tagName: string, arrayHandler: (matchingJsdocTag: import("@es-joy/jsdoccomment").JsdocTagWithInline, targetTagName: string) => void, skipReportingBlockedTag?: boolean | undefined) => void;
export type ReportSettings = (message: string) => void;
export type ParseClosureTemplateTag = (tag: import("comment-parser").Spec) => string[];
export type GetPreferredTagNameObject = (cfg: {
tagName: string;
}) => string | false | {
message: string;
replacement?: string | undefined;
} | {
blocked: true;
tagName: string;
};
export type BasicUtils = {
forEachPreferredTag: ForEachPreferredTag;
reportSettings: ReportSettings;
parseClosureTemplateTag: ParseClosureTemplateTag;
getPreferredTagNameObject: GetPreferredTagNameObject;
pathDoesNotBeginWith: import("./jsdocUtils.js").PathDoesNotBeginWith;
isNameOrNamepathDefiningTag: IsNamepathX;
isNamepathReferencingTag: IsNamepathX;
isNamepathOrUrlReferencingTag: IsNamepathX;
tagMightHaveNameOrNamepath: IsNamepathX;
tagMightHaveName: IsNamepathX;
};
export type IsIteratingFunction = () => boolean;
export type IsVirtualFunction = () => boolean;
export type Stringify = (tagBlock: import("comment-parser").Block, specRewire?: boolean | undefined) => string;
export type ReportJSDoc = (msg: string, tag?: import("comment-parser").Spec | {
line: Integer;
column?: Integer;
} | null | undefined, handler?: ((fixer: import("eslint").Rule.RuleFixer) => import("eslint").Rule.Fix | void) | null | undefined, specRewire?: boolean | undefined, data?: undefined | {
[key: string]: string;
}) => any;
export type GetRegexFromString = (str: string, requiredFlags?: string | undefined) => RegExp;
export type GetTagDescription = (tg: import("comment-parser").Spec, returnArray?: boolean | undefined) => string[] | string;
export type SetTagDescription = (tg: import("comment-parser").Spec, matcher: RegExp, setter: (description: string) => string) => Integer;
export type GetDescription = () => {
description: string;
descriptions: string[];
lastDescriptionLine: Integer;
};
export type SetBlockDescription = (setter: (info: {
delimiter: string;
postDelimiter: string;
start: string;
}, seedTokens: (tokens?: Partial<import("comment-parser").Tokens>) => import("comment-parser").Tokens, descLines: string[], postDelims: string[]) => import("comment-parser").Line[]) => void;
export type SetDescriptionLines = (matcher: RegExp, setter: (description: string) => string) => Integer;
export type ChangeTag = (tag: import("comment-parser").Spec, ...tokens: Partial<import("comment-parser").Tokens>[]) => void;
export type SetTag = (tag: import("comment-parser").Spec & {
line: Integer;
}, tokens?: Partial<import("comment-parser").Tokens> | undefined) => void;
export type RemoveTag = (tagIndex: Integer, cfg?: {
removeEmptyBlock?: boolean;
tagSourceOffset?: Integer;
} | undefined) => void;
export type AddTag = (targetTagName: string, number?: number | undefined, tokens?: Partial<import("comment-parser").Tokens> | undefined) => void;
export type GetFirstLine = () => Integer | undefined;
export type SeedTokens = (tokens?: Partial<import("comment-parser").Tokens> | undefined) => import("comment-parser").Tokens;
/**
* Sets tokens to empty string.
*/
export type EmptyTokens = (tokens: import("comment-parser").Tokens) => void;
export type AddLine = (sourceIndex: Integer, tokens: Partial<import("comment-parser").Tokens>) => void;
export type AddLines = (tagIndex: Integer, tagSourceOffset: Integer, numLines: Integer) => void;
export type MakeMultiline = () => void;
export type GetFunctionParameterNames = (useDefaultObjectProperties?: boolean | undefined, ignoreInterfacedParameters?: boolean | undefined) => import("./jsdocUtils.js").ParamNameInfo[];
export type HasParams = () => Integer;
export type IsGenerator = () => boolean;
export type IsConstructor = () => boolean;
export type GetJsdocTagsDeep = (tagName: string) => false | {
idx: Integer;
name: string;
type: string;
}[];
export type GetPreferredTagName = (cfg: {
tagName: string;
skipReportingBlockedTag?: boolean;
allowObjectReturn?: boolean;
defaultMessage?: string;
}) => string | undefined | false | {
message: string;
replacement?: string | undefined;
} | {
blocked: true;
tagName: string;
};
export type IsValidTag = (name: string, definedTags: string[]) => boolean;
export type HasATag = (names: string[]) => boolean;
export type HasTag = (name: string) => boolean;
export type ComparePaths = (name: string) => (otherPathName: string) => boolean;
export type DropPathSegmentQuotes = (name: string) => string;
export type AvoidDocs = () => boolean;
export type TagMightHaveNamePositionTypePosition = (tagName: string, otherModeMaps?: import("./getDefaultTagStructureForMode.js").TagStructure[] | undefined) => boolean | {
otherMode: true;
};
export type TagMustHave = (tagName: string, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
otherMode: false;
};
export type TagMissingRequiredTypeOrNamepath = (tag: import("comment-parser").Spec, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
otherMode: false;
};
export type IsNamepathX = (tagName: string) => boolean;
export type GetTagStructureForMode = (mde: import("./jsdocUtils.js").ParserMode) => import("./getDefaultTagStructureForMode.js").TagStructure;
export type MayBeUndefinedTypeTag = (tag: import("comment-parser").Spec) => boolean;
export type HasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn: boolean, allBranches?: boolean | undefined) => boolean;
export type HasYieldValue = () => boolean;
export type HasYieldReturnValue = () => boolean;
export type HasThrowValue = () => boolean;
export type IsAsync = () => boolean | undefined;
export type GetTags = (tagName: string) => import("comment-parser").Spec[];
export type GetPresentTags = (tagList: string[]) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
export type FilterTags = (filter: (tag: import("@es-joy/jsdoccomment").JsdocTagWithInline) => boolean) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
export type FilterAllTags = (filter: (tag: (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)) => boolean) => (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)[];
export type getInlineTags = () => (import("comment-parser").Spec | (import("@es-joy/jsdoccomment").JsdocInlineTagNoType & {
line?: number | undefined;
column?: number | undefined;
}))[];
export type GetTagsByType = (tags: import("comment-parser").Spec[]) => {
tagsWithNames: import("comment-parser").Spec[];
tagsWithoutNames: import("comment-parser").Spec[];
};
export type HasOptionTag = (tagName: string) => boolean;
export type GetClassNode = () => Node | null;
export type GetClassJsdoc = () => null | JsdocBlockWithInline;
export type ClassHasTag = (tagName: string) => boolean;
export type FindContext = (contexts: Context[], comment: string | undefined) => {
foundContext: Context | undefined;
contextStr: string;
};
export type Utils = BasicUtils & {
isIteratingFunction: IsIteratingFunction;
isIteratingFunctionOrVariable: IsIteratingFunction;
isVirtualFunction: IsVirtualFunction;
stringify: Stringify;
reportJSDoc: ReportJSDoc;
getRegexFromString: GetRegexFromString;
getTagDescription: GetTagDescription;
setTagDescription: SetTagDescription;
getDescription: GetDescription;
setBlockDescription: SetBlockDescription;
setDescriptionLines: SetDescriptionLines;
changeTag: ChangeTag;
setTag: SetTag;
removeTag: RemoveTag;
addTag: AddTag;
getFirstLine: GetFirstLine;
seedTokens: SeedTokens;
emptyTokens: EmptyTokens;
addLine: AddLine;
addLines: AddLines;
makeMultiline: MakeMultiline;
flattenRoots: import("./jsdocUtils.js").FlattenRoots;
getFunctionParameterNames: GetFunctionParameterNames;
hasParams: HasParams;
isGenerator: IsGenerator;
isConstructor: IsConstructor;
getJsdocTagsDeep: GetJsdocTagsDeep;
getPreferredTagName: GetPreferredTagName;
isValidTag: IsValidTag;
hasATag: HasATag;
hasTag: HasTag;
comparePaths: ComparePaths;
dropPathSegmentQuotes: DropPathSegmentQuotes;
avoidDocs: AvoidDocs;
tagMightHaveNamePosition: TagMightHaveNamePositionTypePosition;
tagMightHaveTypePosition: TagMightHaveNamePositionTypePosition;
tagMustHaveNamePosition: TagMustHave;
tagMustHaveTypePosition: TagMustHave;
tagMissingRequiredTypeOrNamepath: TagMissingRequiredTypeOrNamepath;
isNameOrNamepathDefiningTag: IsNamepathX;
isNamepathReferencingTag: IsNamepathX;
isNamepathOrUrlReferencingTag: IsNamepathX;
tagMightHaveNameOrNamepath: IsNamepathX;
tagMightHaveName: IsNamepathX;
tagMightHaveNamepath: IsNamepathX;
getTagStructureForMode: GetTagStructureForMode;
mayBeUndefinedTypeTag: MayBeUndefinedTypeTag;
hasValueOrExecutorHasNonEmptyResolveValue: HasValueOrExecutorHasNonEmptyResolveValue;
hasYieldValue: HasYieldValue;
hasYieldReturnValue: HasYieldReturnValue;
hasThrowValue: HasThrowValue;
isAsync: IsAsync;
getTags: GetTags;
getPresentTags: GetPresentTags;
filterTags: FilterTags;
filterAllTags: FilterAllTags;
getInlineTags: getInlineTags;
getTagsByType: GetTagsByType;
hasOptionTag: HasOptionTag;
getClassNode: GetClassNode;
getClassJsdoc: GetClassJsdoc;
classHasTag: ClassHasTag;
findContext: FindContext;
};
/**
* Should use ESLint rule's typing.
*/
export type EslintRuleMeta = import("eslint").Rule.RuleMetaData;
/**
* A plain object for tracking state as needed by rules across iterations.
*/
export type StateObject = {
globalTags: boolean;
hasDuplicates: {
[key: string]: boolean;
};
selectorMap: {
[selector: string]: {
[comment: string]: Integer;
};
};
hasTag: {
[key: string]: boolean;
};
hasNonComment: number;
hasNonCommentBeforeTag: {
[key: string]: boolean | number;
};
foundTypedefValues: string[];
};
/**
* The Node AST as supplied by the parser.
*/
export type Node = import("eslint").Rule.Node;
export type Report = (message: string, fix?: import("@eslint/core").RuleFixer | null | undefined, jsdocLoc?: {
line?: Integer;
column?: Integer;
} | (import("comment-parser").Spec & {
line?: Integer;
}) | null | undefined, data?: undefined | {
[key: string]: string;
}) => void;
export type PreferredTypes = {
[key: string]: false | string | {
message: string;
replacement?: false | string;
skipRootChecking?: boolean;
unifyParentAndChildTypeChecks?: boolean;
};
};
export type StructuredTags = {
[key: string]: {
name?: "text" | "name-defining" | "namepath-defining" | "namepath-referencing" | false;
type?: boolean | string[];
required?: ("name" | "type" | "typeOrNameRequired")[];
};
};
/**
* Settings from ESLint types.
*/
export type Settings = {
maxLines: Integer;
minLines: Integer;
tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
mode: import("./jsdocUtils.js").ParserMode;
preferredTypes: PreferredTypes;
structuredTags: StructuredTags;
contexts?: Context[];
augmentsExtendsReplacesDocs?: boolean;
ignoreReplacesDocs?: boolean;
implementsReplacesDocs?: boolean;
overrideReplacesDocs?: boolean;
ignoreInternal?: boolean;
ignorePrivate?: boolean;
exemptDestructuredRootsFromChecks?: boolean;
};
export type JSDocSettings = {
settings?: {
jsdoc?: {
ignorePrivate: boolean;
ignoreInternal: boolean;
maxLines: Integer;
minLines: Integer;
tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
preferredTypes: PreferredTypes;
structuredTags: StructuredTags;
overrideReplacesDocs: boolean;
ignoreReplacesDocs: boolean;
implementsReplacesDocs: boolean;
augmentsExtendsReplacesDocs: boolean;
exemptDestructuredRootsFromChecks: boolean;
mode: import("./jsdocUtils.js").ParserMode;
contexts: Context[];
};
};
};
/**
* Create the report function
*/
export type MakeReport = (context: import("eslint").Rule.RuleContext, commentNode: import("estree").Node) => Report;
export type JsdocVisitorBasic = (arg: {
context: import("eslint").Rule.RuleContext;
sourceCode: import("eslint").SourceCode;
indent?: string;
info?: {
comment?: string | undefined;
lastIndex?: Integer | undefined;
};
state?: StateObject;
globalState?: Map<string, Map<string, string>>;
jsdoc?: JsdocBlockWithInline;
jsdocNode?: import("eslint").Rule.Node & {
range: [number, number];
};
node?: Node;
allComments?: import("estree").Node[];
report?: Report;
makeReport?: MakeReport;
settings: Settings;
utils: BasicUtils;
}) => void;
export type JsdocVisitor = (arg: {
context: import("eslint").Rule.RuleContext;
sourceCode: import("eslint").SourceCode;
indent: string;
info: {
comment?: string | undefined;
lastIndex?: Integer | undefined;
};
state: StateObject;
globalState: Map<string, Map<string, string>>;
jsdoc: JsdocBlockWithInline;
jsdocNode: import("eslint").Rule.Node & {
range: [number, number];
};
node: Node | null;
allComments?: import("estree").Node[];
report: Report;
makeReport?: MakeReport;
settings: Settings;
utils: Utils;
}) => void;
export type NonCommentArgs = {
node: Node;
state: StateObject;
};
export type RuleConfig = {
/**
* ESLint rule meta
*/
meta: EslintRuleMeta;
/**
* Any default contexts
*/
contextDefaults?: jsdocUtils.DefaultContexts | undefined;
/**
* Whether to force a `contexts` check
*/
contextSelected?: true | undefined;
/**
* Modify the rule's context object
*/
modifyContext?: ((context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleContext) | undefined;
/**
* Whether to iterate all JSDoc blocks by default
* regardless of context
*/
iterateAllJsdocs?: true | undefined;
/**
* Whether to check `@private` blocks (normally exempted)
*/
checkPrivate?: true | undefined;
/**
* Whether to check `@internal` blocks (normally exempted)
*/
checkInternal?: true | undefined;
/**
* Whether to iterates over all JSDoc blocks regardless of attachment
*/
checkFile?: true | undefined;
/**
* Whether to avoid relying on settings for global contexts
*/
nonGlobalSettings?: true | undefined;
/**
* Whether to disable the tracking of visited comment nodes (as
* non-tracked may conduct further actions)
*/
noTracking?: true | undefined;
/**
* Whether the rule expects contexts to be based on a match option
*/
matchContext?: true | undefined;
/**
* Handler to be executed upon exiting iteration of program AST
*/
exit?: ((args: {
context: import("eslint").Rule.RuleContext;
state: StateObject;
settings: Settings;
utils: BasicUtils;
}) => void) | undefined;
/**
* Handler to be executed if rule wishes
* to be supplied nodes without comments
*/
nonComment?: ((nca: NonCommentArgs) => void) | undefined;
};
/**
* @typedef {{
* [key: string]: false|string|{
* message: string,
* replacement?: false|string
* skipRootChecking?: boolean
* unifyParentAndChildTypeChecks?: boolean
* }
* }} PreferredTypes
*/
/**
* @typedef {{
* [key: string]: {
* name?: "text"|"name-defining"|"namepath-defining"|"namepath-referencing"|false,
* type?: boolean|string[],
* required?: ("name"|"type"|"typeOrNameRequired")[]
* }
* }} StructuredTags
*/
/**
* Settings from ESLint types.
* @typedef {{
* maxLines: Integer,
* minLines: Integer,
* tagNamePreference: import('./jsdocUtils.js').TagNamePreference,
* mode: import('./jsdocUtils.js').ParserMode,
* preferredTypes: PreferredTypes,
* structuredTags: StructuredTags,
* contexts?: Context[],
* augmentsExtendsReplacesDocs?: boolean,
* ignoreReplacesDocs?: boolean,
* implementsReplacesDocs?: boolean,
* overrideReplacesDocs?: boolean,
* ignoreInternal?: boolean,
* ignorePrivate?: boolean,
* exemptDestructuredRootsFromChecks?: boolean,
* }} Settings
*/
/**
* @typedef {{
* settings?: {
* jsdoc?: {
* ignorePrivate: boolean,
* ignoreInternal: boolean,
* maxLines: Integer,
* minLines: Integer,
* tagNamePreference: import('./jsdocUtils.js').TagNamePreference,
* preferredTypes: PreferredTypes,
* structuredTags: StructuredTags,
* overrideReplacesDocs: boolean,
* ignoreReplacesDocs: boolean,
* implementsReplacesDocs: boolean,
* augmentsExtendsReplacesDocs: boolean,
* exemptDestructuredRootsFromChecks: boolean,
* mode: import('./jsdocUtils.js').ParserMode,
* contexts: Context[],
* }
* }
* }} JSDocSettings
*/
/**
* @param {import('eslint').Rule.RuleContext & JSDocSettings} context
* @returns {Settings|false}
*/
export function getSettings(context: import("eslint").Rule.RuleContext & JSDocSettings): Settings | false;
import * as jsdocUtils from './jsdocUtils.js';

View file

@ -0,0 +1,493 @@
export type Integer = number;
export type ESTreeOrTypeScriptNode = import("./utils/hasReturnValue.js").ESTreeOrTypeScriptNode;
export type ParserMode = "jsdoc" | "typescript" | "closure" | "permissive";
export type ParamCommon = undefined | string | {
name: Integer;
restElement: boolean;
} | {
isRestProperty: boolean | undefined;
name: string;
restElement: boolean;
} | {
name: string;
restElement: boolean;
};
export type ParamNameInfo = ParamCommon | [string | undefined, (FlattendRootInfo & {
annotationParamName?: string;
})] | NestedParamInfo;
export type FlattendRootInfo = {
hasPropertyRest: boolean;
hasRestElement: boolean;
names: string[];
rests: boolean[];
};
export type NestedParamInfo = [string, (string[] | ParamInfo[])];
export type ParamInfo = ParamCommon | [string | undefined, (FlattendRootInfo & {
annotationParamName?: string;
})] | NestedParamInfo;
/**
* Given a nested array of property names, reduce them to a single array,
* appending the name of the root element along the way if present.
*/
export type FlattenRoots = (params: ParamInfo[], root?: string | undefined) => FlattendRootInfo;
export type Reporter = {
report: (descriptor: import("eslint").Rule.ReportDescriptor) => void;
};
export type DefaultContexts = true | string[];
export type TagNamePreference = {
[key: string]: false | string | {
message: string;
replacement?: string;
};
};
export type PathDoesNotBeginWith = (name: string, otherPathName: string) => boolean;
/**
* @param {string} name
* @returns {(otherPathName: string) => boolean}
*/
export function comparePaths(name: string): (otherPathName: string) => boolean;
/**
* Since path segments may be unquoted (if matching a reserved word,
* identifier or numeric literal) or single or double quoted, in either
* the `@param` or in source, we need to strip the quotes to give a fair
* comparison.
* @param {string} str
* @returns {string}
*/
export function dropPathSegmentQuotes(str: string): string;
/**
* @typedef {true|string[]} DefaultContexts
*/
/**
* Checks user option for `contexts` array, defaulting to
* contexts designated by the rule. Returns an array of
* ESTree AST types, indicating allowable contexts.
* @param {import('eslint').Rule.RuleContext} context
* @param {DefaultContexts|undefined} defaultContexts
* @param {{
* contexts?: import('./iterateJsdoc.js').Context[]
* }} settings
* @returns {(string|import('./iterateJsdoc.js').ContextObject)[]}
*/
export function enforcedContexts(context: import("eslint").Rule.RuleContext, defaultContexts: DefaultContexts | undefined, settings: {
contexts?: import("./iterateJsdoc.js").Context[];
}): (string | import("./iterateJsdoc.js").ContextObject)[];
/**
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @param {import('eslint').Rule.Node|null} node
* @param {import('eslint').Rule.RuleContext} context
* @param {import('json-schema').JSONSchema4} schema
* @returns {boolean}
*/
export function exemptSpeciaMethods(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, node: import("eslint").Rule.Node | null, context: import("eslint").Rule.RuleContext, schema: import("json-schema").JSONSchema4): boolean;
/**
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @param {(tag: import('@es-joy/jsdoccomment').JsdocTagWithInline) => boolean} filter
* @returns {import('@es-joy/jsdoccomment').JsdocTagWithInline[]}
*/
export function filterTags(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, filter: (tag: import("@es-joy/jsdoccomment").JsdocTagWithInline) => boolean): import("@es-joy/jsdoccomment").JsdocTagWithInline[];
/**
* @typedef {undefined|string|{
* name: Integer,
* restElement: boolean
* }|{
* isRestProperty: boolean|undefined,
* name: string,
* restElement: boolean
* }|{
* name: string,
* restElement: boolean
* }} ParamCommon
*/
/**
* @typedef {ParamCommon|[string|undefined, (FlattendRootInfo & {
* annotationParamName?: string,
* })]|NestedParamInfo} ParamNameInfo
*/
/**
* @typedef {{
* hasPropertyRest: boolean,
* hasRestElement: boolean,
* names: string[],
* rests: boolean[],
* }} FlattendRootInfo
*/
/**
* @typedef {[string, (string[]|ParamInfo[])]} NestedParamInfo
*/
/**
* @typedef {ParamCommon|
* [string|undefined, (FlattendRootInfo & {
* annotationParamName?: string
* })]|
* NestedParamInfo} ParamInfo
*/
/**
* Given a nested array of property names, reduce them to a single array,
* appending the name of the root element along the way if present.
* @callback FlattenRoots
* @param {ParamInfo[]} params
* @param {string} [root]
* @returns {FlattendRootInfo}
*/
/** @type {FlattenRoots} */
export const flattenRoots: FlattenRoots;
/**
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @param {string} tagName
* @param {(
* matchingJsdocTag: import('@es-joy/jsdoccomment').JsdocTagWithInline,
* targetTagName: string
* ) => void} arrayHandler
* @param {object} cfg
* @param {import('eslint').Rule.RuleContext} [cfg.context]
* @param {ParserMode} [cfg.mode]
* @param {import('./iterateJsdoc.js').Report} [cfg.report]
* @param {TagNamePreference} [cfg.tagNamePreference]
* @param {boolean} [cfg.skipReportingBlockedTag]
* @returns {void}
*/
export function forEachPreferredTag(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, tagName: string, arrayHandler: (matchingJsdocTag: import("@es-joy/jsdoccomment").JsdocTagWithInline, targetTagName: string) => void, { context, mode, report, skipReportingBlockedTag, tagNamePreference, }?: {
context?: import("eslint").Rule.RuleContext | undefined;
mode?: ParserMode | undefined;
report?: import("./iterateJsdoc.js").Report | undefined;
tagNamePreference?: TagNamePreference | undefined;
skipReportingBlockedTag?: boolean | undefined;
}): void;
/**
* Get all tags, inline tags and inline tags in tags
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @returns {(import('comment-parser').Spec|
* import('@es-joy/jsdoccomment').JsdocInlineTagNoType & {
* line?: number | undefined; column?: number | undefined;
* })[]}
*/
export function getAllTags(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline): (import("comment-parser").Spec | (import("@es-joy/jsdoccomment").JsdocInlineTagNoType & {
line?: number | undefined;
column?: number | undefined;
}))[];
/**
* @param {import('./iterateJsdoc.js').Context[]} contexts
* @param {import('./iterateJsdoc.js').CheckJsdoc} checkJsdoc
* @param {import('@es-joy/jsdoccomment').CommentHandler} [handler]
* @returns {import('eslint').Rule.RuleListener}
*/
export function getContextObject(contexts: import("./iterateJsdoc.js").Context[], checkJsdoc: import("./iterateJsdoc.js").CheckJsdoc, handler?: import("@es-joy/jsdoccomment").CommentHandler): import("eslint").Rule.RuleListener;
/**
* @param {ESTreeOrTypeScriptNode|null} functionNode
* @param {boolean} [checkDefaultObjects]
* @param {boolean} [ignoreInterfacedParameters]
* @throws {Error}
* @returns {ParamNameInfo[]}
*/
export function getFunctionParameterNames(functionNode: ESTreeOrTypeScriptNode | null, checkDefaultObjects?: boolean, ignoreInterfacedParameters?: boolean): ParamNameInfo[];
/**
* @param {import('eslint').SourceCode|{
* text: string
* }} sourceCode
* @returns {string}
*/
export function getIndent(sourceCode: import("eslint").SourceCode | {
text: string;
}): string;
/**
* Get all inline tags and inline tags in tags
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @returns {(import('comment-parser').Spec|
* import('@es-joy/jsdoccomment').JsdocInlineTagNoType & {
* line?: number | undefined; column?: number | undefined;
* })[]}
*/
export function getInlineTags(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline): (import("comment-parser").Spec | (import("@es-joy/jsdoccomment").JsdocInlineTagNoType & {
line?: number | undefined;
column?: number | undefined;
}))[];
/**
* Gets all names of the target type, including those that refer to a path, e.g.
* `foo` or `foo.bar`.
* @param {import('comment-parser').Block} jsdoc
* @param {string} targetTagName
* @returns {{
* idx: Integer,
* name: string,
* type: string
* }[]}
*/
export function getJsdocTagsDeep(jsdoc: import("comment-parser").Block, targetTagName: string): {
idx: Integer;
name: string;
type: string;
}[];
/**
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @param {{
* tagName: string,
* context?: import('eslint').Rule.RuleContext,
* mode?: ParserMode,
* report?: import('./iterateJsdoc.js').Report
* tagNamePreference?: TagNamePreference
* skipReportingBlockedTag?: boolean,
* allowObjectReturn?: boolean,
* defaultMessage?: string,
* }} cfg
* @returns {string|undefined|false|{
* message: string;
* replacement?: string|undefined;
* }|{
* blocked: true,
* tagName: string
* }}
*/
export function getPreferredTagName(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, { allowObjectReturn, context, tagName, defaultMessage, mode, report, skipReportingBlockedTag, tagNamePreference, }: {
tagName: string;
context?: import("eslint").Rule.RuleContext;
mode?: ParserMode;
report?: import("./iterateJsdoc.js").Report;
tagNamePreference?: TagNamePreference;
skipReportingBlockedTag?: boolean;
allowObjectReturn?: boolean;
defaultMessage?: string;
}): string | undefined | false | {
message: string;
replacement?: string | undefined;
} | {
blocked: true;
tagName: string;
};
/**
* @typedef {{
* report: (descriptor: import('eslint').Rule.ReportDescriptor) => void
* }} Reporter
*/
/**
* @param {string} name
* @param {ParserMode|undefined} mode
* @param {TagNamePreference} tagPreference
* @param {import('eslint').Rule.RuleContext} context
* @returns {string|false|{
* message: string;
* replacement?: string|undefined;
* }}
*/
export function getPreferredTagNameSimple(name: string, mode: ParserMode | undefined, tagPreference?: TagNamePreference, context?: import("eslint").Rule.RuleContext): string | false | {
message: string;
replacement?: string | undefined;
};
/**
* @param {string} regexString
* @param {string} [requiredFlags]
* @returns {RegExp}
*/
export function getRegexFromString(regexString: string, requiredFlags?: string): RegExp;
/**
* @param {import('comment-parser').Spec} tg
* @param {boolean} [returnArray]
* @returns {string[]|string}
*/
export function getTagDescription(tg: import("comment-parser").Spec, returnArray?: boolean): string[] | string;
/**
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @param {string} tagName
* @returns {import('comment-parser').Spec[]}
*/
export function getTags(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, tagName: string): import("comment-parser").Spec[];
/**
* @typedef {{
* [key: string]: false|string|
* {message: string, replacement?: string}
* }} TagNamePreference
*/
/**
* @param {import('eslint').Rule.RuleContext} context
* @param {ParserMode|undefined} mode
* @param {import('comment-parser').Spec[]} tags
* @returns {{
* tagsWithNames: import('comment-parser').Spec[],
* tagsWithoutNames: import('comment-parser').Spec[]
* }}
*/
export function getTagsByType(context: import("eslint").Rule.RuleContext, mode: ParserMode | undefined, tags: import("comment-parser").Spec[]): {
tagsWithNames: import("comment-parser").Spec[];
tagsWithoutNames: import("comment-parser").Spec[];
};
/**
* @param {ParserMode} mode
* @param {import('./iterateJsdoc.js').StructuredTags} structuredTags
* @returns {import('./getDefaultTagStructureForMode.js').TagStructure}
*/
export function getTagStructureForMode(mode: ParserMode, structuredTags: import("./iterateJsdoc.js").StructuredTags): import("./getDefaultTagStructureForMode.js").TagStructure;
/**
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @param {string[]} targetTagNames
* @returns {boolean}
*/
export function hasATag(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, targetTagNames: string[]): boolean;
/**
* @param {ESTreeOrTypeScriptNode} functionNode
* @returns {Integer}
*/
export function hasParams(functionNode: ESTreeOrTypeScriptNode): Integer;
/**
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
* @param {string} targetTagName
* @returns {boolean}
*/
export function hasTag(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, targetTagName: string): boolean;
/**
* Checks if a node has a throws statement.
* @param {ESTreeOrTypeScriptNode|null|undefined} node
* @param {boolean} [innerFunction]
* @returns {boolean}
*/
export function hasThrowValue(node: ESTreeOrTypeScriptNode | null | undefined, innerFunction?: boolean): boolean;
/**
* Checks if a node has a return statement. Void return does not count.
* @param {ESTreeOrTypeScriptNode} node
* @param {boolean} [checkYieldReturnValue]
* @returns {boolean}
*/
export function hasYieldValue(node: ESTreeOrTypeScriptNode, checkYieldReturnValue?: boolean): boolean;
/**
* @param {import('eslint').Rule.Node|null} node
* @returns {boolean}
*/
export function isConstructor(node: import("eslint").Rule.Node | null): boolean;
/**
* @param {import('eslint').Rule.Node|null} node
* @returns {boolean}
*/
export function isGetter(node: import("eslint").Rule.Node | null): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function isNameOrNamepathDefiningTag(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function isNamepathOrUrlReferencingTag(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function isNamepathReferencingTag(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {import('eslint').Rule.Node|null} node
* @returns {boolean}
*/
export function isSetter(node: import("eslint").Rule.Node | null): boolean;
/**
* @param {import('eslint').Rule.RuleContext} context
* @param {ParserMode|undefined} mode
* @param {string} name
* @param {string[]} definedTags
* @returns {boolean}
*/
export function isValidTag(context: import("eslint").Rule.RuleContext, mode: ParserMode | undefined, name: string, definedTags: string[]): boolean;
/**
* Checks if the JSDoc comment has an undefined type.
* @param {import('comment-parser').Spec|null|undefined} tag
* the tag which should be checked.
* @param {ParserMode} mode
* @returns {boolean}
* true in case a defined type is undeclared; otherwise false.
*/
export function mayBeUndefinedTypeTag(tag: import("comment-parser").Spec | null | undefined, mode: ParserMode): boolean;
/**
* @param {import('./iterateJsdoc.js').StructuredTags} structuredTags
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {void}
*/
export function overrideTagStructure(structuredTags: import("./iterateJsdoc.js").StructuredTags, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): void;
/**
* @param {string} tag
*/
/**
* Parses GCC Generic/Template types
* @see {@link https://github.com/google/closure-compiler/wiki/Generic-Types}
* @see {@link https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#template}
* @param {import('comment-parser').Spec} tag
* @returns {string[]}
*/
export function parseClosureTemplateTag(tag: import("comment-parser").Spec): string[];
/**
* @callback PathDoesNotBeginWith
* @param {string} name
* @param {string} otherPathName
* @returns {boolean}
*/
/** @type {PathDoesNotBeginWith} */
export const pathDoesNotBeginWith: PathDoesNotBeginWith;
/**
* @param {import('@es-joy/jsdoccomment').JsdocBlockWithInline} jsdoc
* @param {import('@es-joy/jsdoccomment').JsdocTagWithInline} tag
* @param {import('jsdoc-type-pratt-parser').RootResult} parsedType
* @param {string} indent
* @param {string} typeBracketSpacing
*/
export function rewireByParsedType(jsdoc: import("@es-joy/jsdoccomment").JsdocBlockWithInline, tag: import("@es-joy/jsdoccomment").JsdocTagWithInline, parsedType: import("jsdoc-type-pratt-parser").RootResult, indent: string, typeBracketSpacing?: string): void;
/**
* @param {ParserMode} mode
* @returns {void}
*/
export function setTagStructure(mode: ParserMode): void;
export const strictNativeTypes: string[];
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function tagMightHaveEitherTypeOrNamePosition(tag: string, tagMap: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function tagMightHaveName(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function tagMightHaveNameOrNamepath(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function tagMightHaveNamepath(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean}
*/
export function tagMightHaveNamePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean|string}
*/
export function tagMightHaveTypePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | string;
/**
* @param {import('comment-parser').Spec} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean|undefined}
*/
export function tagMissingRequiredTypeOrNamepath(tag: import("comment-parser").Spec, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | undefined;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean|undefined}
*/
export function tagMustHaveNamePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | undefined;
/**
* @param {string} tag
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
* @returns {boolean|undefined}
*/
export function tagMustHaveTypePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | undefined;
export { hasReturnValue, hasValueOrExecutorHasNonEmptyResolveValue } from "./utils/hasReturnValue.js";

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,3 @@
declare const _default: eslint.Rule.RuleModule;
export default _default;
import eslint from 'eslint';

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,9 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;
export type CustomSpacings = {
postDelimiter: import("../iterateJsdoc.js").Integer;
postHyphen: import("../iterateJsdoc.js").Integer;
postName: import("../iterateJsdoc.js").Integer;
postTag: import("../iterateJsdoc.js").Integer;
postType: import("../iterateJsdoc.js").Integer;
};

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,7 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;
/**
* Iterates strict types to see if any should be added to `invalidTypes` (and
* the the relevant strict type returned as the new preferred type).
*/
export type CheckNativeTypes = (preferredTypes: import("../iterateJsdoc.js").PreferredTypes, typeNodeName: string, preferred: string | undefined, parentNode: import("jsdoc-type-pratt-parser").NonRootResult | undefined, invalidTypes: (string | false | undefined)[][]) => string | undefined;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,9 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;
export type ContextObject = {
comment: string;
context: string;
message: string;
minimum: import("../iterateJsdoc.js").Integer;
};
export type Context = string | ContextObject;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,25 @@
declare const _default: {
create(context: import("eslint").Rule.RuleContext): {};
meta: {
docs: {
category: string;
description: string;
recommended: boolean;
url: string;
};
fixable: "code";
messages: {
missingJsDoc: string;
};
schema: import("json-schema").JSONSchema4[];
type: "suggestion";
};
};
export default _default;
export type RequireJsdocOpts = {
ancestorsOnly: boolean;
esm: boolean;
initModuleExports: boolean;
initWindow: boolean;
};
export type ESLintOrTSNode = import("eslint").Rule.Node | import("@typescript-eslint/types").TSESTree.Node;

View file

@ -0,0 +1,3 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;
export type RootNamerReturn = [string, boolean, () => RootNamerReturn];

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,2 @@
declare const _default: import("eslint").Rule.RuleModule;
export default _default;

View file

@ -0,0 +1,15 @@
export type AliasedTags = {
[key: string]: string[];
};
/**
* @type {AliasedTags}
*/
export const closureTags: AliasedTags;
/**
* @type {AliasedTags}
*/
export const jsdocTags: AliasedTags;
/**
* @type {AliasedTags}
*/
export const typeScriptTags: AliasedTags;

View file

@ -0,0 +1,19 @@
export type ESTreeOrTypeScriptNode = import("estree").Node | import("@typescript-eslint/types").TSESTree.Node;
export type PromiseFilter = (node: ESTreeOrTypeScriptNode | undefined) => boolean;
/**
* Checks if a node has a return statement. Void return does not count.
* @param {ESTreeOrTypeScriptNode|undefined|null} node
* @param {boolean} [throwOnNullReturn]
* @param {PromiseFilter} [promFilter]
* @returns {boolean|undefined}
*/
export function hasReturnValue(node: ESTreeOrTypeScriptNode | undefined | null, throwOnNullReturn?: boolean, promFilter?: PromiseFilter): boolean | undefined;
/**
* Checks if a Promise executor has no resolve value or an empty value.
* An `undefined` resolve does not count.
* @param {ESTreeOrTypeScriptNode} node
* @param {boolean} anyPromiseAsReturn
* @param {boolean} [allBranches]
* @returns {boolean}
*/
export function hasValueOrExecutorHasNonEmptyResolveValue(node: ESTreeOrTypeScriptNode, anyPromiseAsReturn: boolean, allBranches?: boolean): boolean;