import { TSESLint, TSESTree, ESLintUtils } from "@typescript-eslint/utils"; export type RuleModule = TSESLint.RuleModule; export declare const createRule: (opts: Readonly>) => RuleModule; export declare function getTypesPackageForDeclarationFile(file: string): string | undefined; export declare function commentsMatching(sourceFile: Readonly, regex: RegExp, f: (match: string, c: TSESTree.Comment) => void): void; export declare function findUp(p: string, fn: (p: string) => T | undefined): T | undefined; export interface TypesPackageInfo { /** directory containing package json; this is a OS-specific path */ dir: string; /** package.json with name="@types/foo__bar-baz" */ packageJson: PackageJSON; /** real package name being typed, like "@foo/bar-baz" */ realName: string; } export interface PackageJSON { name: string; version: string; owners: string[]; dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; tsconfigs?: string[]; } export declare function findTypesPackage(file: string): TypesPackageInfo | undefined; export declare function getImportSource(node: TSESTree.ImportDeclaration | TSESTree.TSImportEqualsDeclaration): TSESTree.StringLiteral | undefined; export declare function isMainFile(fileName: string, allowNested: boolean): boolean;