UNPKG

@graphql-eslint/eslint-plugin

Version:
50 lines (47 loc) 1.49 kB
import { FromSchema } from 'json-schema-to-ts'; import { GraphQLESLintRule } from '../../types.cjs'; import 'eslint'; import 'estree'; import 'graphql'; import 'graphql-config'; import '../../estree-converter/types.cjs'; import '../../siblings.cjs'; import '@graphql-tools/utils'; 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"; }; readonly requireAllFields: { readonly type: "boolean"; readonly description: "Whether all fields of `fieldName` option must be included."; }; }; }; }; type RuleOptions = FromSchema<typeof schema>; declare const rule: GraphQLESLintRule<RuleOptions, true>; export { type RuleOptions, rule };