UNPKG

@graphql-eslint/eslint-plugin

Version:
75 lines (72 loc) 2.85 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 type: "array"; readonly minItems: 1; readonly maxItems: 1; readonly items: { readonly type: "object"; readonly additionalProperties: false; readonly minProperties: 1; readonly properties: { readonly fields: { readonly items: { readonly enum: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[]; }; readonly description: "Fields of `type`, `interface`, and `input`."; readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; }; readonly values: { readonly type: "boolean"; readonly description: "Values of `enum`."; }; readonly selections: { readonly items: { readonly enum: ("OperationDefinition" | "FragmentDefinition")[]; }; readonly description: "Selections of `fragment` and operations `query`, `mutation` and `subscription`."; readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; }; readonly variables: { readonly type: "boolean"; readonly description: "Variables of operations `query`, `mutation` and `subscription`."; }; readonly arguments: { readonly items: { readonly enum: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[]; }; readonly description: "Arguments of fields and directives."; readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; }; readonly definitions: { readonly type: "boolean"; readonly description: "Definitions – `type`, `interface`, `enum`, `scalar`, `input`, `union` and `directive`."; }; readonly groups: { readonly minItems: 2; readonly description: string; readonly type: "array"; readonly uniqueItems: true; readonly items: { readonly type: "string"; }; }; }; }; }; type RuleOptions = FromSchema<typeof schema>; declare const rule: GraphQLESLintRule<RuleOptions>; export { type RuleOptions, rule };