UNPKG

@graphql-eslint/eslint-plugin

Version:
108 lines (105 loc) 3.74 kB
import { FromSchema } from 'json-schema-to-ts'; import { f as GraphQLESLintRule } from '../types-8d5f4ae0.js'; import '@graphql-tools/utils'; import 'eslint'; import 'estree'; import 'graphql'; import 'graphql-config'; import '../estree-converter/types.js'; type AllowedStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE'; declare const schema: { readonly definitions: { readonly asString: { readonly enum: AllowedStyle[]; readonly description: `One of: ${string}`; }; readonly asObject: { readonly type: "object"; readonly additionalProperties: false; readonly properties: { readonly style: { readonly enum: AllowedStyle[]; }; readonly prefix: { readonly type: "string"; }; readonly suffix: { readonly type: "string"; }; readonly forbiddenPrefixes: { readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; readonly items: { readonly type: "string"; }; }; readonly forbiddenSuffixes: { readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; readonly items: { readonly type: "string"; }; }; readonly requiredPrefixes: { readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; readonly items: { readonly type: "string"; }; }; readonly requiredSuffixes: { readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; readonly items: { readonly type: "string"; }; }; readonly ignorePattern: { readonly type: "string"; readonly description: "Option to skip validation of some words, e.g. acronyms"; }; }; }; }; readonly type: "array"; readonly maxItems: 1; readonly items: { readonly type: "object"; readonly additionalProperties: false; readonly properties: { readonly allowLeadingUnderscore: { readonly type: "boolean"; readonly default: false; }; readonly allowTrailingUnderscore: { readonly type: "boolean"; readonly default: false; }; readonly types: { readonly description: `Includes:\n${string}`; readonly oneOf: readonly [{ readonly $ref: "#/definitions/asString"; }, { readonly $ref: "#/definitions/asObject"; }]; }; }; readonly patternProperties: { readonly [x: string]: { readonly oneOf: readonly [{ readonly $ref: "#/definitions/asString"; }, { readonly $ref: "#/definitions/asObject"; }]; }; }; readonly description: string; }; }; type RuleOptions = FromSchema<typeof schema>; declare const rule: GraphQLESLintRule<RuleOptions>; export { RuleOptions, rule };