UNPKG

@graphql-eslint/eslint-plugin

Version:
83 lines (80 loc) 2.64 kB
import { FromSchema } from 'json-schema-to-ts'; import { GraphQLESLintRule } from '../../types.cjs'; import { CaseStyle as CaseStyle$1 } from '../../utils.cjs'; import 'eslint'; import 'estree'; import 'graphql'; import 'graphql-config'; import '../../estree-converter/types.cjs'; import '../../siblings.cjs'; import '@graphql-tools/utils'; type CaseStyle = CaseStyle$1 | 'matchDocumentStyle'; declare const schema: { readonly definitions: { readonly asString: { enum: CaseStyle[]; description: string; }; readonly asObject: { readonly type: "object"; readonly additionalProperties: false; readonly minProperties: 1; readonly properties: { readonly style: { enum: CaseStyle[]; description: string; }; readonly suffix: { readonly type: "string"; }; readonly prefix: { readonly type: "string"; }; }; }; }; readonly type: "array"; readonly minItems: 1; readonly maxItems: 1; readonly items: { readonly type: "object"; readonly additionalProperties: false; readonly minProperties: 1; readonly properties: { readonly fileExtension: { readonly enum: readonly [".gql", ".graphql"]; }; readonly query: { readonly oneOf: readonly [{ readonly $ref: "#/definitions/asString"; }, { readonly $ref: "#/definitions/asObject"; }]; }; readonly mutation: { readonly oneOf: readonly [{ readonly $ref: "#/definitions/asString"; }, { readonly $ref: "#/definitions/asObject"; }]; }; readonly subscription: { readonly oneOf: readonly [{ readonly $ref: "#/definitions/asString"; }, { readonly $ref: "#/definitions/asObject"; }]; }; readonly fragment: { readonly oneOf: readonly [{ readonly $ref: "#/definitions/asString"; }, { readonly $ref: "#/definitions/asObject"; }]; }; }; }; }; type RuleOptions = FromSchema<typeof schema>; declare const rule: GraphQLESLintRule<RuleOptions>; export { type RuleOptions, rule };