@graphql-eslint/eslint-plugin
Version:
GraphQL plugin for ESLint
126 lines (123 loc) • 6.28 kB
TypeScript
import { RuleOptions } from './require-description.js';
import { CaseStyle } from '../utils.js';
import { f as GraphQLESLintRule } from '../types-8d5f4ae0.js';
import * as json_schema_to_ts_lib_types_type_utils_writable_js from 'json-schema-to-ts/lib/types/type-utils/writable.js';
import 'graphql';
import 'eslint';
import 'estree';
import '../estree-converter/types.js';
import '@graphql-tools/utils';
import 'graphql-config';
import 'json-schema-to-ts';
declare const rules: {
alphabetize: GraphQLESLintRule<{
definitions?: boolean | undefined;
selections?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<"OperationDefinition" | "FragmentDefinition">[] | undefined;
arguments?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<"Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition">[] | undefined;
values?: "EnumTypeDefinition"[] | undefined;
fields?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<"ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition">[] | undefined;
variables?: "OperationDefinition"[] | undefined;
groups?: string[] | undefined;
}[]>;
'description-style': GraphQLESLintRule<{
style?: "block" | "inline" | undefined;
}[]>;
'input-name': GraphQLESLintRule<{
checkInputType?: boolean | undefined;
caseSensitiveInputType?: boolean | undefined;
checkQueries?: boolean | undefined;
checkMutations?: boolean | undefined;
}[]>;
'lone-executable-definition': GraphQLESLintRule<{
ignore?: ("fragment" | "query" | "mutation" | "subscription")[] | undefined;
}[]>;
'match-document-filename': GraphQLESLintRule<{
fragment?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | {
style?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | undefined;
suffix?: string | undefined;
prefix?: string | undefined;
} | undefined;
query?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | {
style?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | undefined;
suffix?: string | undefined;
prefix?: string | undefined;
} | undefined;
mutation?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | {
style?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | undefined;
suffix?: string | undefined;
prefix?: string | undefined;
} | undefined;
subscription?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | {
style?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<CaseStyle | "matchDocumentStyle"> | undefined;
suffix?: string | undefined;
prefix?: string | undefined;
} | undefined;
fileExtension?: ".gql" | ".graphql" | undefined;
}[]>;
'naming-convention': GraphQLESLintRule<{
[x: string]: unknown;
types?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<"camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE"> | {
style?: json_schema_to_ts_lib_types_type_utils_writable_js.DeepWritable<"camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE"> | undefined;
suffix?: string | undefined;
prefix?: string | undefined;
forbiddenPrefixes?: string[] | undefined;
forbiddenSuffixes?: string[] | undefined;
requiredPrefixes?: string[] | undefined;
requiredSuffixes?: string[] | undefined;
ignorePattern?: string | undefined;
} | undefined;
allowLeadingUnderscore?: boolean | undefined;
allowTrailingUnderscore?: boolean | undefined;
}[]>;
'no-anonymous-operations': GraphQLESLintRule;
'no-case-insensitive-enum-values-duplicates': GraphQLESLintRule;
'no-deprecated': GraphQLESLintRule<[], true>;
'no-duplicate-fields': GraphQLESLintRule;
'no-hashtag-description': GraphQLESLintRule;
'no-one-place-fragments': GraphQLESLintRule;
'no-root-type': GraphQLESLintRule<{
disallow: ("mutation" | "subscription")[];
}[]>;
'no-scalar-result-type-on-mutation': GraphQLESLintRule;
'no-typename-prefix': GraphQLESLintRule;
'no-unreachable-types': GraphQLESLintRule;
'no-unused-fields': GraphQLESLintRule;
'relay-arguments': GraphQLESLintRule<{
includeBoth?: boolean | undefined;
}[], true>;
'relay-connection-types': GraphQLESLintRule;
'relay-edge-types': GraphQLESLintRule<{
withEdgeSuffix?: boolean | undefined;
shouldImplementNode?: boolean | undefined;
listTypeCanWrapOnlyEdgeType?: boolean | undefined;
}[], true>;
'relay-page-info': GraphQLESLintRule;
'require-deprecation-date': GraphQLESLintRule<{
argumentName?: string | undefined;
}[]>;
'require-deprecation-reason': GraphQLESLintRule;
'require-description': GraphQLESLintRule<RuleOptions>;
'require-field-of-type-query-in-mutation-result': GraphQLESLintRule;
'require-id-when-available': GraphQLESLintRule<{
fieldName?: string | string[] | undefined;
}[], true>;
'require-import-fragment': GraphQLESLintRule;
'require-nullable-fields-with-oneof': GraphQLESLintRule;
'require-nullable-result-in-root': GraphQLESLintRule;
'require-type-pattern-with-oneof': GraphQLESLintRule;
'selection-set-depth': GraphQLESLintRule<{
ignore?: string[] | undefined;
maxDepth: number;
}[]>;
'strict-id-in-types': GraphQLESLintRule<{
acceptedIdNames?: string[] | undefined;
acceptedIdTypes?: string[] | undefined;
exceptions?: {
types?: string[] | undefined;
suffixes?: string[] | undefined;
} | undefined;
}[]>;
'unique-fragment-name': GraphQLESLintRule;
'unique-operation-name': GraphQLESLintRule;
};
export { rules };