UNPKG

@graphql-eslint/eslint-plugin

Version:
37 lines (36 loc) 1.1 kB
import { GraphQLESLintRule } from '../types.cjs'; import { FromSchema } from 'json-schema-to-ts'; declare const schema: { readonly definitions: { readonly asString: { readonly type: "string"; }; readonly asArray: { readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; readonly items: { readonly type: "string"; }; }; }; readonly type: "array"; readonly maxItems: 1; readonly items: { readonly type: "object"; readonly additionalProperties: false; readonly properties: { readonly fieldName: { readonly oneOf: readonly [{ readonly $ref: "#/definitions/asString"; }, { readonly $ref: "#/definitions/asArray"; }]; readonly default: "id"; }; }; }; }; export type RuleOptions = FromSchema<typeof schema>; export declare const rule: GraphQLESLintRule<RuleOptions, true>; export {};