UNPKG

@graphql-eslint/eslint-plugin

Version:
38 lines (37 loc) 1.24 kB
import { GraphQLESLintRule } from '../types'; declare const KindToDisplayName: { ObjectTypeDefinition: string; InterfaceTypeDefinition: string; EnumTypeDefinition: string; ScalarTypeDefinition: string; InputObjectTypeDefinition: string; UnionTypeDefinition: string; FieldDefinition: string; InputValueDefinition: string; Argument: string; DirectiveDefinition: string; EnumValueDefinition: string; OperationDefinition: string; FragmentDefinition: string; VariableDefinition: string; }; declare type AllowedKind = keyof typeof KindToDisplayName; declare type AllowedStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE'; declare type PropertySchema = { style?: AllowedStyle; suffix?: string; prefix?: string; forbiddenPrefixes?: string[]; forbiddenSuffixes?: string[]; ignorePattern?: string; }; declare type Options = AllowedStyle | PropertySchema; export declare type NamingConventionRuleConfig = { allowLeadingUnderscore?: boolean; allowTrailingUnderscore?: boolean; types?: Options; } & { [key in `${AllowedKind}${string}`]?: Options; }; declare const rule: GraphQLESLintRule<[NamingConventionRuleConfig]>; export default rule;