UNPKG

@graphql-eslint/eslint-plugin

Version:
26 lines (23 loc) 996 B
import { Kind } from 'graphql'; import { GraphQLESLintRule } from '../../types.cjs'; import 'eslint'; import 'estree'; import 'graphql-config'; import 'json-schema-to-ts'; import '../../estree-converter/types.cjs'; import '../../siblings.cjs'; import '@graphql-tools/utils'; declare const RULE_ID = "require-description"; declare const ALLOWED_KINDS: readonly [Kind.OBJECT_TYPE_DEFINITION, Kind.INTERFACE_TYPE_DEFINITION, Kind.ENUM_TYPE_DEFINITION, Kind.SCALAR_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_DEFINITION, Kind.UNION_TYPE_DEFINITION, Kind.DIRECTIVE_DEFINITION, Kind.FIELD_DEFINITION, Kind.INPUT_VALUE_DEFINITION, Kind.ENUM_VALUE_DEFINITION, Kind.OPERATION_DEFINITION]; type AllowedKind = (typeof ALLOWED_KINDS)[number]; type RuleOptions = [ { [key in AllowedKind]?: boolean; } & { types?: true; rootField?: true; ignoredSelectors?: string[]; } ]; declare const rule: GraphQLESLintRule<RuleOptions>; export { RULE_ID, type RuleOptions, rule };