@graphql-eslint/eslint-plugin 3.14.0-alpha-20221220004017-f1f0904 → 3.14.0-alpha-20221220160018-ba4832c

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/configs/operations-all.json +1 -0
  2. package/index.js +596 -467
  3. package/index.mjs +597 -468
  4. package/package.json +1 -1
  5. package/rules/alphabetize.d.ts +65 -14
  6. package/rules/description-style.d.ts +18 -4
  7. package/rules/index.d.ts +76 -18
  8. package/rules/input-name.d.ts +33 -7
  9. package/rules/lone-executable-definition.d.ts +26 -0
  10. package/rules/match-document-filename.d.ts +65 -13
  11. package/rules/naming-convention.d.ts +80 -34
  12. package/rules/no-anonymous-operations.d.ts +1 -2
  13. package/rules/no-case-insensitive-enum-values-duplicates.d.ts +1 -2
  14. package/rules/no-deprecated.d.ts +1 -2
  15. package/rules/no-duplicate-fields.d.ts +1 -2
  16. package/rules/no-hashtag-description.d.ts +1 -2
  17. package/rules/no-root-type.d.ts +23 -5
  18. package/rules/no-scalar-result-type-on-mutation.d.ts +1 -2
  19. package/rules/no-typename-prefix.d.ts +1 -2
  20. package/rules/no-unreachable-types.d.ts +1 -2
  21. package/rules/no-unused-fields.d.ts +1 -2
  22. package/rules/relay-arguments.d.ts +19 -4
  23. package/rules/relay-connection-types.d.ts +1 -2
  24. package/rules/relay-edge-types.d.ts +29 -6
  25. package/rules/relay-page-info.d.ts +1 -2
  26. package/rules/require-deprecation-date.d.ts +17 -4
  27. package/rules/require-deprecation-reason.d.ts +1 -2
  28. package/rules/require-description.d.ts +10 -7
  29. package/rules/require-field-of-type-query-in-mutation-result.d.ts +1 -2
  30. package/rules/require-id-when-available.d.ts +34 -4
  31. package/rules/selection-set-depth.d.ts +26 -5
  32. package/rules/strict-id-in-types.d.ts +54 -8
  33. package/rules/unique-fragment-name.d.ts +1 -2
  34. package/rules/unique-operation-name.d.ts +1 -2
  35. package/testkit.d.ts +1 -1
  36. package/types.d.ts +3 -1
  37. package/utils.d.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.14.0-alpha-20221220004017-f1f0904",
3
+ "version": "3.14.0-alpha-20221220160018-ba4832c",
4
4
  "description": "GraphQL plugin for ESLint",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -1,16 +1,67 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const fieldsEnum: ('ObjectTypeDefinition' | 'InterfaceTypeDefinition' | 'InputObjectTypeDefinition')[];
3
- declare const valuesEnum: ['EnumTypeDefinition'];
4
- declare const selectionsEnum: ('OperationDefinition' | 'FragmentDefinition')[];
5
- declare const variablesEnum: ['OperationDefinition'];
6
- declare const argumentsEnum: ('FieldDefinition' | 'Field' | 'DirectiveDefinition' | 'Directive')[];
7
- export type AlphabetizeConfig = {
8
- fields?: typeof fieldsEnum;
9
- values?: typeof valuesEnum;
10
- selections?: typeof selectionsEnum;
11
- variables?: typeof variablesEnum;
12
- arguments?: typeof argumentsEnum;
13
- definitions?: boolean;
2
+ import { FromSchema } from 'json-schema-to-ts';
3
+ declare const schema: {
4
+ readonly type: "array";
5
+ readonly minItems: 1;
6
+ readonly maxItems: 1;
7
+ readonly items: {
8
+ readonly type: "object";
9
+ readonly additionalProperties: false;
10
+ readonly minProperties: 1;
11
+ readonly properties: {
12
+ readonly fields: {
13
+ readonly items: {
14
+ readonly enum: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[];
15
+ };
16
+ readonly description: "Fields of `type`, `interface`, and `input`.";
17
+ readonly type: "array";
18
+ readonly uniqueItems: true;
19
+ readonly minItems: 1;
20
+ };
21
+ readonly values: {
22
+ readonly items: {
23
+ readonly enum: ["EnumTypeDefinition"];
24
+ };
25
+ readonly description: "Values of `enum`.";
26
+ readonly type: "array";
27
+ readonly uniqueItems: true;
28
+ readonly minItems: 1;
29
+ };
30
+ readonly selections: {
31
+ readonly items: {
32
+ readonly enum: ("OperationDefinition" | "FragmentDefinition")[];
33
+ };
34
+ readonly description: "Selections of `fragment` and operations `query`, `mutation` and `subscription`.";
35
+ readonly type: "array";
36
+ readonly uniqueItems: true;
37
+ readonly minItems: 1;
38
+ };
39
+ readonly variables: {
40
+ readonly items: {
41
+ readonly enum: ["OperationDefinition"];
42
+ };
43
+ readonly description: "Variables of operations `query`, `mutation` and `subscription`.";
44
+ readonly type: "array";
45
+ readonly uniqueItems: true;
46
+ readonly minItems: 1;
47
+ };
48
+ readonly arguments: {
49
+ readonly items: {
50
+ readonly enum: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[];
51
+ };
52
+ readonly description: "Arguments of fields and directives.";
53
+ readonly type: "array";
54
+ readonly uniqueItems: true;
55
+ readonly minItems: 1;
56
+ };
57
+ readonly definitions: {
58
+ readonly type: "boolean";
59
+ readonly description: "Definitions – `type`, `interface`, `enum`, `scalar`, `input`, `union` and `directive`.";
60
+ readonly default: false;
61
+ };
62
+ };
63
+ };
14
64
  };
15
- declare const rule: GraphQLESLintRule<[AlphabetizeConfig]>;
16
- export default rule;
65
+ export type RuleOptions = FromSchema<typeof schema>;
66
+ export declare const rule: GraphQLESLintRule<RuleOptions>;
67
+ export {};
@@ -1,6 +1,20 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- type DescriptionStyleRuleConfig = {
3
- style: 'inline' | 'block';
2
+ import { FromSchema } from 'json-schema-to-ts';
3
+ declare const schema: {
4
+ readonly type: "array";
5
+ readonly maxItems: 1;
6
+ readonly items: {
7
+ readonly type: "object";
8
+ readonly additionalProperties: false;
9
+ readonly minProperties: 1;
10
+ readonly properties: {
11
+ readonly style: {
12
+ readonly enum: readonly ["block", "inline"];
13
+ readonly default: "block";
14
+ };
15
+ };
16
+ };
4
17
  };
5
- declare const rule: GraphQLESLintRule<[DescriptionStyleRuleConfig]>;
6
- export default rule;
18
+ export type RuleOptions = FromSchema<typeof schema>;
19
+ export declare const rule: GraphQLESLintRule<RuleOptions>;
20
+ export {};
package/rules/index.d.ts CHANGED
@@ -1,41 +1,99 @@
1
1
  export declare const rules: {
2
- alphabetize: import("..").GraphQLESLintRule<[import("./alphabetize").AlphabetizeConfig], false>;
3
- 'description-style': import("..").GraphQLESLintRule<[{
4
- style: "block" | "inline";
5
- }], false>;
6
- 'input-name': import("..").GraphQLESLintRule<[{
2
+ alphabetize: import("..").GraphQLESLintRule<{
3
+ definitions?: boolean;
4
+ selections?: import("json-schema-to-ts/lib/types/type-utils").Writable<"OperationDefinition" | "FragmentDefinition">[];
5
+ arguments?: import("json-schema-to-ts/lib/types/type-utils").Writable<"Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition">[];
6
+ values?: "EnumTypeDefinition"[];
7
+ fields?: import("json-schema-to-ts/lib/types/type-utils").Writable<"ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition">[];
8
+ variables?: "OperationDefinition"[];
9
+ }[], false>;
10
+ 'description-style': import("..").GraphQLESLintRule<{
11
+ style?: "block" | "inline";
12
+ }[], false>;
13
+ 'input-name': import("..").GraphQLESLintRule<{
7
14
  checkInputType?: boolean;
8
15
  caseSensitiveInputType?: boolean;
9
16
  checkQueries?: boolean;
10
17
  checkMutations?: boolean;
11
- }], false>;
12
- 'match-document-filename': import("..").GraphQLESLintRule<[import("./match-document-filename").MatchDocumentFilenameRuleConfig], false>;
13
- 'naming-convention': import("..").GraphQLESLintRule<[import("./naming-convention").NamingConventionRuleConfig], false>;
18
+ }[], false>;
19
+ 'lone-executable-definition': import("..").GraphQLESLintRule<{
20
+ ignore?: ("fragment" | "query" | "mutation" | "subscription")[];
21
+ }[], false>;
22
+ 'match-document-filename': import("..").GraphQLESLintRule<{
23
+ fragment?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle"> | {
24
+ style?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle">;
25
+ suffix?: string;
26
+ };
27
+ query?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle"> | {
28
+ style?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle">;
29
+ suffix?: string;
30
+ };
31
+ mutation?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle"> | {
32
+ style?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle">;
33
+ suffix?: string;
34
+ };
35
+ subscription?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle"> | {
36
+ style?: import("json-schema-to-ts/lib/types/type-utils").Writable<import("../utils").CaseStyle | "matchDocumentStyle">;
37
+ suffix?: string;
38
+ };
39
+ fileExtension?: ".gql" | ".graphql";
40
+ }[], false>;
41
+ 'naming-convention': import("..").GraphQLESLintRule<{
42
+ [x: string]: unknown;
43
+ types?: import("json-schema-to-ts/lib/types/type-utils").Writable<"camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE"> | {
44
+ style?: import("json-schema-to-ts/lib/types/type-utils").Writable<"camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE">;
45
+ suffix?: string;
46
+ prefix?: string;
47
+ forbiddenPrefixes?: string[];
48
+ forbiddenSuffixes?: string[];
49
+ ignorePattern?: string;
50
+ };
51
+ allowLeadingUnderscore?: boolean;
52
+ allowTrailingUnderscore?: boolean;
53
+ }[], false>;
14
54
  'no-anonymous-operations': import("..").GraphQLESLintRule<any[], false>;
15
55
  'no-case-insensitive-enum-values-duplicates': import("..").GraphQLESLintRule<any[], false>;
16
56
  'no-deprecated': import("..").GraphQLESLintRule<[], true>;
17
57
  'no-duplicate-fields': import("..").GraphQLESLintRule<any[], false>;
18
58
  'no-hashtag-description': import("..").GraphQLESLintRule<any[], false>;
19
- 'no-root-type': import("..").GraphQLESLintRule<[{
59
+ 'no-root-type': import("..").GraphQLESLintRule<{
20
60
  disallow: ("mutation" | "subscription")[];
21
- }], false>;
61
+ }[], false>;
22
62
  'no-scalar-result-type-on-mutation': import("..").GraphQLESLintRule<any[], false>;
23
63
  'no-typename-prefix': import("..").GraphQLESLintRule<any[], false>;
24
64
  'no-unreachable-types': import("..").GraphQLESLintRule<any[], false>;
25
65
  'no-unused-fields': import("..").GraphQLESLintRule<any[], false>;
26
- 'relay-arguments': import("..").GraphQLESLintRule<[import("./relay-arguments").RelayArgumentsConfig], true>;
66
+ 'relay-arguments': import("..").GraphQLESLintRule<{
67
+ includeBoth?: boolean;
68
+ }[], true>;
27
69
  'relay-connection-types': import("..").GraphQLESLintRule<any[], false>;
28
- 'relay-edge-types': import("..").GraphQLESLintRule<[import("./relay-edge-types").EdgeTypesConfig], true>;
70
+ 'relay-edge-types': import("..").GraphQLESLintRule<{
71
+ withEdgeSuffix?: boolean;
72
+ shouldImplementNode?: boolean;
73
+ listTypeCanWrapOnlyEdgeType?: boolean;
74
+ }[], true>;
29
75
  'relay-page-info': import("..").GraphQLESLintRule<any[], false>;
30
- 'require-deprecation-date': import("..").GraphQLESLintRule<[{
76
+ 'require-deprecation-date': import("..").GraphQLESLintRule<{
31
77
  argumentName?: string;
32
- }], false>;
78
+ }[], false>;
33
79
  'require-deprecation-reason': import("..").GraphQLESLintRule<any[], false>;
34
- 'require-description': import("..").GraphQLESLintRule<[import("./require-description").RequireDescriptionRuleConfig], false>;
80
+ 'require-description': import("..").GraphQLESLintRule<import("./require-description").RuleOptions, false>;
35
81
  'require-field-of-type-query-in-mutation-result': import("..").GraphQLESLintRule<any[], false>;
36
- 'require-id-when-available': import("..").GraphQLESLintRule<[import("./require-id-when-available").RequireIdWhenAvailableRuleConfig], true>;
37
- 'selection-set-depth': import("..").GraphQLESLintRule<[import("./selection-set-depth").SelectionSetDepthRuleConfig], false>;
38
- 'strict-id-in-types': import("..").GraphQLESLintRule<[import("./strict-id-in-types").StrictIdInTypesRuleConfig], false>;
82
+ 'require-id-when-available': import("..").GraphQLESLintRule<{
83
+ fieldName?: string | string[];
84
+ }[], true>;
85
+ 'selection-set-depth': import("..").GraphQLESLintRule<{
86
+ ignore?: string[];
87
+ maxDepth: number;
88
+ }[], false>;
89
+ 'strict-id-in-types': import("..").GraphQLESLintRule<{
90
+ acceptedIdNames?: string[];
91
+ acceptedIdTypes?: string[];
92
+ exceptions?: {
93
+ types?: string[];
94
+ suffixes?: string[];
95
+ };
96
+ }[], false>;
39
97
  'unique-fragment-name': import("..").GraphQLESLintRule<any[], false>;
40
98
  'unique-operation-name': import("..").GraphQLESLintRule<any[], false>;
41
99
  };
@@ -1,9 +1,35 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- type InputNameRuleConfig = {
3
- checkInputType?: boolean;
4
- caseSensitiveInputType?: boolean;
5
- checkQueries?: boolean;
6
- checkMutations?: boolean;
2
+ import { FromSchema } from 'json-schema-to-ts';
3
+ declare const schema: {
4
+ readonly type: "array";
5
+ readonly maxItems: 1;
6
+ readonly items: {
7
+ readonly type: "object";
8
+ readonly additionalProperties: false;
9
+ readonly properties: {
10
+ readonly checkInputType: {
11
+ readonly type: "boolean";
12
+ readonly default: false;
13
+ readonly description: "Check that the input type name follows the convention <mutationName>Input";
14
+ };
15
+ readonly caseSensitiveInputType: {
16
+ readonly type: "boolean";
17
+ readonly default: true;
18
+ readonly description: "Allow for case discrepancies in the input type name";
19
+ };
20
+ readonly checkQueries: {
21
+ readonly type: "boolean";
22
+ readonly default: false;
23
+ readonly description: "Apply the rule to Queries";
24
+ };
25
+ readonly checkMutations: {
26
+ readonly type: "boolean";
27
+ readonly default: true;
28
+ readonly description: "Apply the rule to Mutations";
29
+ };
30
+ };
31
+ };
7
32
  };
8
- declare const rule: GraphQLESLintRule<[InputNameRuleConfig]>;
9
- export default rule;
33
+ export type RuleOptions = FromSchema<typeof schema>;
34
+ export declare const rule: GraphQLESLintRule<RuleOptions>;
35
+ export {};
@@ -0,0 +1,26 @@
1
+ import { GraphQLESLintRule } from '../types';
2
+ import { FromSchema } from 'json-schema-to-ts';
3
+ declare const schema: {
4
+ readonly type: "array";
5
+ readonly maxItems: 1;
6
+ readonly items: {
7
+ readonly type: "object";
8
+ readonly minProperties: 1;
9
+ readonly additionalProperties: false;
10
+ readonly properties: {
11
+ readonly ignore: {
12
+ readonly maxItems: 3;
13
+ readonly items: {
14
+ readonly enum: readonly ["fragment", "query", "mutation", "subscription"];
15
+ };
16
+ readonly description: "Allow certain definitions to be placed alongside others.";
17
+ readonly type: "array";
18
+ readonly uniqueItems: true;
19
+ readonly minItems: 1;
20
+ };
21
+ };
22
+ };
23
+ };
24
+ export type RuleOptions = FromSchema<typeof schema>;
25
+ export declare const rule: GraphQLESLintRule<RuleOptions>;
26
+ export {};
@@ -1,17 +1,69 @@
1
1
  import { CaseStyle as _CaseStyle } from '../utils';
2
2
  import { GraphQLESLintRule } from '../types';
3
+ import { FromSchema } from 'json-schema-to-ts';
3
4
  type CaseStyle = _CaseStyle | 'matchDocumentStyle';
4
- declare const ACCEPTED_EXTENSIONS: ['.gql', '.graphql'];
5
- type PropertySchema = {
6
- style?: CaseStyle;
7
- suffix?: string;
5
+ declare const schema: {
6
+ readonly definitions: {
7
+ readonly asString: {
8
+ readonly enum: CaseStyle[];
9
+ readonly description: `One of: ${string}`;
10
+ };
11
+ readonly asObject: {
12
+ readonly type: "object";
13
+ readonly additionalProperties: false;
14
+ readonly minProperties: 1;
15
+ readonly properties: {
16
+ readonly style: {
17
+ readonly enum: CaseStyle[];
18
+ };
19
+ readonly suffix: {
20
+ readonly type: "string";
21
+ };
22
+ };
23
+ };
24
+ };
25
+ readonly type: "array";
26
+ readonly minItems: 1;
27
+ readonly maxItems: 1;
28
+ readonly items: {
29
+ readonly type: "object";
30
+ readonly additionalProperties: false;
31
+ readonly minProperties: 1;
32
+ readonly properties: {
33
+ readonly fileExtension: {
34
+ readonly enum: readonly [".gql", ".graphql"];
35
+ };
36
+ readonly query: {
37
+ readonly oneOf: readonly [{
38
+ readonly $ref: "#/definitions/asString";
39
+ }, {
40
+ readonly $ref: "#/definitions/asObject";
41
+ }];
42
+ };
43
+ readonly mutation: {
44
+ readonly oneOf: readonly [{
45
+ readonly $ref: "#/definitions/asString";
46
+ }, {
47
+ readonly $ref: "#/definitions/asObject";
48
+ }];
49
+ };
50
+ readonly subscription: {
51
+ readonly oneOf: readonly [{
52
+ readonly $ref: "#/definitions/asString";
53
+ }, {
54
+ readonly $ref: "#/definitions/asObject";
55
+ }];
56
+ };
57
+ readonly fragment: {
58
+ readonly oneOf: readonly [{
59
+ readonly $ref: "#/definitions/asString";
60
+ }, {
61
+ readonly $ref: "#/definitions/asObject";
62
+ }];
63
+ };
64
+ };
65
+ };
8
66
  };
9
- export type MatchDocumentFilenameRuleConfig = {
10
- fileExtension?: typeof ACCEPTED_EXTENSIONS[number];
11
- query?: CaseStyle | PropertySchema;
12
- mutation?: CaseStyle | PropertySchema;
13
- subscription?: CaseStyle | PropertySchema;
14
- fragment?: CaseStyle | PropertySchema;
15
- };
16
- declare const rule: GraphQLESLintRule<[MatchDocumentFilenameRuleConfig]>;
17
- export default rule;
67
+ export type RuleOptions = FromSchema<typeof schema>;
68
+ export declare const rule: GraphQLESLintRule<RuleOptions>;
69
+ export {};
@@ -1,37 +1,83 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const KindToDisplayName: {
3
- ObjectTypeDefinition: string;
4
- InterfaceTypeDefinition: string;
5
- EnumTypeDefinition: string;
6
- ScalarTypeDefinition: string;
7
- InputObjectTypeDefinition: string;
8
- UnionTypeDefinition: string;
9
- FieldDefinition: string;
10
- InputValueDefinition: string;
11
- Argument: string;
12
- DirectiveDefinition: string;
13
- EnumValueDefinition: string;
14
- OperationDefinition: string;
15
- FragmentDefinition: string;
16
- VariableDefinition: string;
17
- };
18
- type AllowedKind = keyof typeof KindToDisplayName;
2
+ import { FromSchema } from 'json-schema-to-ts';
19
3
  type AllowedStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE';
20
- type PropertySchema = {
21
- style?: AllowedStyle;
22
- suffix?: string;
23
- prefix?: string;
24
- forbiddenPrefixes?: string[];
25
- forbiddenSuffixes?: string[];
26
- ignorePattern?: string;
27
- };
28
- type Options = AllowedStyle | PropertySchema;
29
- export type NamingConventionRuleConfig = {
30
- allowLeadingUnderscore?: boolean;
31
- allowTrailingUnderscore?: boolean;
32
- types?: Options;
33
- } & {
34
- [key in `${AllowedKind}${string}`]?: Options;
4
+ declare const schema: {
5
+ readonly definitions: {
6
+ readonly asString: {
7
+ readonly enum: AllowedStyle[];
8
+ readonly description: `One of: ${string}`;
9
+ };
10
+ readonly asObject: {
11
+ readonly type: "object";
12
+ readonly additionalProperties: false;
13
+ readonly properties: {
14
+ readonly style: {
15
+ readonly enum: AllowedStyle[];
16
+ };
17
+ readonly prefix: {
18
+ readonly type: "string";
19
+ };
20
+ readonly suffix: {
21
+ readonly type: "string";
22
+ };
23
+ readonly forbiddenPrefixes: {
24
+ readonly type: "array";
25
+ readonly uniqueItems: true;
26
+ readonly minItems: 1;
27
+ readonly items: {
28
+ readonly type: "string";
29
+ };
30
+ };
31
+ readonly forbiddenSuffixes: {
32
+ readonly type: "array";
33
+ readonly uniqueItems: true;
34
+ readonly minItems: 1;
35
+ readonly items: {
36
+ readonly type: "string";
37
+ };
38
+ };
39
+ readonly ignorePattern: {
40
+ readonly type: "string";
41
+ readonly description: "Option to skip validation of some words, e.g. acronyms";
42
+ };
43
+ };
44
+ };
45
+ };
46
+ readonly type: "array";
47
+ readonly maxItems: 1;
48
+ readonly items: {
49
+ readonly type: "object";
50
+ readonly additionalProperties: false;
51
+ readonly properties: {
52
+ readonly allowLeadingUnderscore: {
53
+ readonly type: "boolean";
54
+ readonly default: false;
55
+ };
56
+ readonly allowTrailingUnderscore: {
57
+ readonly type: "boolean";
58
+ readonly default: false;
59
+ };
60
+ readonly types: {
61
+ readonly description: `Includes:\n${string}`;
62
+ readonly oneOf: readonly [{
63
+ readonly $ref: "#/definitions/asString";
64
+ }, {
65
+ readonly $ref: "#/definitions/asObject";
66
+ }];
67
+ };
68
+ };
69
+ readonly patternProperties: {
70
+ readonly [x: string]: {
71
+ readonly oneOf: readonly [{
72
+ readonly $ref: "#/definitions/asString";
73
+ }, {
74
+ readonly $ref: "#/definitions/asObject";
75
+ }];
76
+ };
77
+ };
78
+ readonly description: string;
79
+ };
35
80
  };
36
- declare const rule: GraphQLESLintRule<[NamingConventionRuleConfig]>;
37
- export default rule;
81
+ export type RuleOptions = FromSchema<typeof schema>;
82
+ export declare const rule: GraphQLESLintRule<RuleOptions>;
83
+ export {};
@@ -1,3 +1,2 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,3 +1,2 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,3 +1,2 @@
1
1
  import type { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule<[], true>;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule<[], true>;
@@ -1,3 +1,2 @@
1
1
  import type { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,3 +1,2 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,7 +1,25 @@
1
1
  import type { GraphQLESLintRule } from '../types';
2
- declare const ROOT_TYPES: ('mutation' | 'subscription')[];
3
- type NoRootTypeConfig = {
4
- disallow: typeof ROOT_TYPES;
2
+ import { FromSchema } from 'json-schema-to-ts';
3
+ declare const schema: {
4
+ readonly type: "array";
5
+ readonly minItems: 1;
6
+ readonly maxItems: 1;
7
+ readonly items: {
8
+ readonly type: "object";
9
+ readonly additionalProperties: false;
10
+ readonly required: readonly ["disallow"];
11
+ readonly properties: {
12
+ readonly disallow: {
13
+ readonly items: {
14
+ readonly enum: readonly ["mutation", "subscription"];
15
+ };
16
+ readonly type: "array";
17
+ readonly uniqueItems: true;
18
+ readonly minItems: 1;
19
+ };
20
+ };
21
+ };
5
22
  };
6
- declare const rule: GraphQLESLintRule<[NoRootTypeConfig]>;
7
- export default rule;
23
+ export type RuleOptions = FromSchema<typeof schema>;
24
+ export declare const rule: GraphQLESLintRule<RuleOptions>;
25
+ export {};
@@ -1,3 +1,2 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,3 +1,2 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,3 +1,2 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,3 +1,2 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;
2
+ export declare const rule: GraphQLESLintRule;
@@ -1,6 +1,21 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- export type RelayArgumentsConfig = {
3
- includeBoth?: boolean;
2
+ import { FromSchema } from 'json-schema-to-ts';
3
+ declare const schema: {
4
+ readonly type: "array";
5
+ readonly maxItems: 1;
6
+ readonly items: {
7
+ readonly type: "object";
8
+ readonly additionalProperties: false;
9
+ readonly minProperties: 1;
10
+ readonly properties: {
11
+ readonly includeBoth: {
12
+ readonly type: "boolean";
13
+ readonly default: true;
14
+ readonly description: "Enforce including both forward and backward pagination arguments";
15
+ };
16
+ };
17
+ };
4
18
  };
5
- declare const rule: GraphQLESLintRule<[RelayArgumentsConfig], true>;
6
- export default rule;
19
+ export type RuleOptions = FromSchema<typeof schema>;
20
+ export declare const rule: GraphQLESLintRule<RuleOptions, true>;
21
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { Kind } from 'graphql';
2
2
  import type { GraphQLESLintRule } from '../types';
3
3
  export declare const NON_OBJECT_TYPES: Kind[];
4
- declare const rule: GraphQLESLintRule;
5
- export default rule;
4
+ export declare const rule: GraphQLESLintRule;