UNPKG

591 BTypeScriptView Raw
1import type { Rule } from 'eslint';
2import type { Node } from 'estree';
3
4type Visitor = (source: Node, importer: unknown) => any;
5
6type Options = {
7 amd?: boolean;
8 commonjs?: boolean;
9 esmodule?: boolean;
10 ignore?: string[];
11};
12
13declare function moduleVisitor(
14 visitor: Visitor,
15 options?: Options,
16): object;
17
18export default moduleVisitor;
19
20export type Schema = NonNullable<Rule.RuleModule['schema']>;
21
22declare function makeOptionsSchema(additionalProperties?: Partial<Schema>): Schema
23
24declare const optionsSchema: Schema;
25
26export { makeOptionsSchema, optionsSchema };