import { ESLintUtils, type TSESLint } from "@typescript-eslint/utils"; export declare function docsUrl(name: string, subdir?: string): string; /** * Whether ESLint parsed the file being linted as JavaScript or TypeScript. * * The recommended config also lints package.json, manifest.json and LICENSE * with other languages, and a rule enabled without `files` reaches them too. * Their AST is a `Document`, not a `Program`. A TS file without type * information is still a `Program`, so a type-aware rule keeps throwing there. */ export declare function isJsProgram(context: { sourceCode: { ast: unknown; }; }): boolean; /** * The `meta.docs` fields this plugin's rules may set besides `description` and * `url`. */ export interface PluginDocs { /** * The rule calls getParserServices() without a fallback, so it throws on a * file linted without type information. eslint-doc-generator reads it to * mark the rule as needing type information in the README and the rule doc. */ requiresTypeChecking?: boolean; } /** * A rule as ruleCreator() takes it. typescript-eslint deprecates the top-level * `defaultOptions` in favour of `meta.defaultOptions`, but the oldest * typescript-eslint this plugin supports, 8.35.1, reads only the top-level * one: with `meta.defaultOptions` alone, a rule there would run without its * defaults. So the rules keep it, under this declaration of their own. */ export type PluginRule = Omit, "defaultOptions"> & { /** The options the rule runs with, merged under those the user gives. */ defaultOptions?: Readonly; }; /** * Creates a JavaScript/TypeScript rule. Every rule made here returns no * visitors for a file in another language, so a type-aware rule does not throw * from getParserServices() and abort the whole lint run on LICENSE or * manifest.json. */ export declare function ruleCreator(rule: Readonly>): TSESLint.RuleModule;