@graphql-eslint/eslint-plugin
Version:
GraphQL plugin for ESLint
81 lines (78 loc) • 2.61 kB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
import { f as GraphQLESLintRule } from '../types-8d5f4ae0.js';
import { CaseStyle as CaseStyle$1 } from '../utils.js';
import '@graphql-tools/utils';
import 'eslint';
import 'estree';
import 'graphql';
import 'graphql-config';
import '../estree-converter/types.js';
type CaseStyle = CaseStyle$1 | 'matchDocumentStyle';
declare const schema: {
readonly definitions: {
readonly asString: {
readonly enum: CaseStyle[];
readonly description: `One of: ${string}`;
};
readonly asObject: {
readonly type: "object";
readonly additionalProperties: false;
readonly minProperties: 1;
readonly properties: {
readonly style: {
readonly enum: CaseStyle[];
};
readonly suffix: {
readonly type: "string";
};
readonly prefix: {
readonly type: "string";
};
};
};
};
readonly type: "array";
readonly minItems: 1;
readonly maxItems: 1;
readonly items: {
readonly type: "object";
readonly additionalProperties: false;
readonly minProperties: 1;
readonly properties: {
readonly fileExtension: {
readonly enum: readonly [".gql", ".graphql"];
};
readonly query: {
readonly oneOf: readonly [{
readonly $ref: "#/definitions/asString";
}, {
readonly $ref: "#/definitions/asObject";
}];
};
readonly mutation: {
readonly oneOf: readonly [{
readonly $ref: "#/definitions/asString";
}, {
readonly $ref: "#/definitions/asObject";
}];
};
readonly subscription: {
readonly oneOf: readonly [{
readonly $ref: "#/definitions/asString";
}, {
readonly $ref: "#/definitions/asObject";
}];
};
readonly fragment: {
readonly oneOf: readonly [{
readonly $ref: "#/definitions/asString";
}, {
readonly $ref: "#/definitions/asObject";
}];
};
};
};
};
type RuleOptions = FromSchema<typeof schema>;
declare const rule: GraphQLESLintRule<RuleOptions>;
export { RuleOptions, rule };