@graphql-eslint/eslint-plugin
Version:
GraphQL plugin for ESLint
73 lines (72 loc) • 2.44 kB
TypeScript
import { CaseStyle as _CaseStyle } from '../utils.js';
import { GraphQLESLintRule } from '../types.js';
import { FromSchema } from 'json-schema-to-ts';
type CaseStyle = _CaseStyle | '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";
}];
};
};
};
};
export type RuleOptions = FromSchema<typeof schema>;
export declare const rule: GraphQLESLintRule<RuleOptions>;
export {};