@graphql-eslint/eslint-plugin
Version:
GraphQL plugin for ESLint
34 lines (33 loc) • 1.7 kB
TypeScript
import { GraphQLSchema, Kind } from 'graphql';
import { AST } from 'eslint';
import { Position } from 'estree';
import { GraphQLESLintRuleContext } from './types';
import { SiblingOperations } from './documents';
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;
export declare const VIRTUAL_DOCUMENT_REGEX: RegExp;
export declare const CWD: 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;