UNPKG

@graphql-eslint/eslint-plugin

Version:
40 lines (39 loc) 2.1 kB
import type { GraphQLSchema } from 'graphql'; import { Kind } from 'graphql'; import type { AST } from 'eslint'; import type { Position } from 'estree'; import type { GraphQLESLintRuleContext } from './types'; import type { SiblingOperations } from './sibling-operations'; export declare function requireSiblingsOperations(ruleId: string, context: GraphQLESLintRuleContext): SiblingOperations | never; export declare function requireGraphQLSchemaFromContext(ruleId: string, context: GraphQLESLintRuleContext): GraphQLSchema | never; export declare const logger: { error: (...args: any[]) => void; warn: (...args: any[]) => void; }; export declare const normalizePath: (path: string) => string; /** * https://github.com/prettier/eslint-plugin-prettier/blob/76bd45ece6d56eb52f75db6b4a1efdd2efb56392/eslint-plugin-prettier.js#L71 * Given a filepath, get the nearest path that is a regular file. * The filepath provided by eslint may be a virtual filepath rather than a file * on disk. This attempts to transform a virtual path into an on-disk path */ export declare const getOnDiskFilepath: (filepath: string) => string; export declare const getTypeName: (node: any) => string; export declare const TYPES_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]; export declare type CaseStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE' | 'kebab-case'; export declare const camelCase: (str: string) => string; export declare const convertCase: (style: CaseStyle, str: string) => string; export declare function getLocation(start: Position, fieldName?: string): AST.SourceLocation; export declare const REPORT_ON_FIRST_CHARACTER: { column: number; line: number; }; export declare const ARRAY_DEFAULT_OPTIONS: { readonly type: "array"; readonly uniqueItems: true; readonly minItems: 1; readonly items: { readonly type: "string"; }; }; export declare const englishJoinWords: (words: any) => string;