@graphql-eslint/eslint-plugin
Version:
GraphQL plugin for ESLint
84 lines (83 loc) • 2.96 kB
TypeScript
import { GraphQLESLintRule } from '../types.js';
import { FromSchema } from 'json-schema-to-ts';
type AllowedStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE';
declare const schema: {
readonly definitions: {
readonly asString: {
readonly enum: AllowedStyle[];
readonly description: `One of: ${string}`;
};
readonly asObject: {
readonly type: "object";
readonly additionalProperties: false;
readonly properties: {
readonly style: {
readonly enum: AllowedStyle[];
};
readonly prefix: {
readonly type: "string";
};
readonly suffix: {
readonly type: "string";
};
readonly forbiddenPrefixes: {
readonly type: "array";
readonly uniqueItems: true;
readonly minItems: 1;
readonly items: {
readonly type: "string";
};
};
readonly forbiddenSuffixes: {
readonly type: "array";
readonly uniqueItems: true;
readonly minItems: 1;
readonly items: {
readonly type: "string";
};
};
readonly ignorePattern: {
readonly type: "string";
readonly description: "Option to skip validation of some words, e.g. acronyms";
};
};
};
};
readonly type: "array";
readonly maxItems: 1;
readonly items: {
readonly type: "object";
readonly additionalProperties: false;
readonly properties: {
readonly allowLeadingUnderscore: {
readonly type: "boolean";
readonly default: false;
};
readonly allowTrailingUnderscore: {
readonly type: "boolean";
readonly default: false;
};
readonly types: {
readonly description: `Includes:\n${string}`;
readonly oneOf: readonly [{
readonly $ref: "#/definitions/asString";
}, {
readonly $ref: "#/definitions/asObject";
}];
};
};
readonly patternProperties: {
readonly [x: string]: {
readonly oneOf: readonly [{
readonly $ref: "#/definitions/asString";
}, {
readonly $ref: "#/definitions/asObject";
}];
};
};
readonly description: string;
};
};
export type RuleOptions = FromSchema<typeof schema>;
export declare const rule: GraphQLESLintRule<RuleOptions>;
export {};