@graphql-eslint/eslint-plugin 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +5 -5
  2. package/configs/base.json +4 -0
  3. package/configs/operations-all.json +24 -0
  4. package/configs/operations-recommended.json +50 -0
  5. package/configs/schema-all.json +26 -0
  6. package/configs/schema-recommended.json +49 -0
  7. package/docs/README.md +59 -57
  8. package/docs/custom-rules.md +8 -8
  9. package/docs/parser-options.md +4 -4
  10. package/docs/parser.md +2 -2
  11. package/docs/rules/alphabetize.md +11 -5
  12. package/docs/rules/description-style.md +2 -0
  13. package/docs/rules/executable-definitions.md +1 -1
  14. package/docs/rules/fields-on-correct-type.md +1 -1
  15. package/docs/rules/fragments-on-composite-type.md +1 -1
  16. package/docs/rules/input-name.md +2 -0
  17. package/docs/rules/known-argument-names.md +1 -1
  18. package/docs/rules/known-directives.md +29 -2
  19. package/docs/rules/known-fragment-names.md +1 -1
  20. package/docs/rules/known-type-names.md +1 -1
  21. package/docs/rules/lone-anonymous-operation.md +1 -1
  22. package/docs/rules/lone-schema-definition.md +1 -1
  23. package/docs/rules/naming-convention.md +2 -0
  24. package/docs/rules/no-anonymous-operations.md +2 -0
  25. package/docs/rules/no-case-insensitive-enum-values-duplicates.md +2 -0
  26. package/docs/rules/no-deprecated.md +2 -0
  27. package/docs/rules/no-duplicate-fields.md +2 -0
  28. package/docs/rules/no-fragment-cycles.md +1 -1
  29. package/docs/rules/no-hashtag-description.md +2 -0
  30. package/docs/rules/no-root-type.md +2 -0
  31. package/docs/rules/no-scalar-result-type-on-mutation.md +2 -0
  32. package/docs/rules/no-typename-prefix.md +2 -0
  33. package/docs/rules/no-undefined-variables.md +1 -1
  34. package/docs/rules/no-unreachable-types.md +2 -0
  35. package/docs/rules/no-unused-fields.md +2 -0
  36. package/docs/rules/no-unused-fragments.md +1 -1
  37. package/docs/rules/no-unused-variables.md +1 -1
  38. package/docs/rules/one-field-subscriptions.md +1 -1
  39. package/docs/rules/overlapping-fields-can-be-merged.md +1 -1
  40. package/docs/rules/possible-fragment-spread.md +1 -1
  41. package/docs/rules/possible-type-extension.md +1 -1
  42. package/docs/rules/provided-required-arguments.md +1 -1
  43. package/docs/rules/require-deprecation-date.md +2 -0
  44. package/docs/rules/require-id-when-available.md +2 -0
  45. package/docs/rules/scalar-leafs.md +1 -1
  46. package/docs/rules/selection-set-depth.md +2 -0
  47. package/docs/rules/unique-argument-names.md +1 -1
  48. package/docs/rules/unique-directive-names-per-location.md +1 -1
  49. package/docs/rules/unique-directive-names.md +1 -1
  50. package/docs/rules/unique-enum-value-names.md +1 -1
  51. package/docs/rules/unique-field-definition-names.md +1 -1
  52. package/docs/rules/unique-input-field-names.md +1 -1
  53. package/docs/rules/unique-operation-types.md +1 -1
  54. package/docs/rules/unique-type-names.md +1 -1
  55. package/docs/rules/unique-variable-names.md +1 -1
  56. package/docs/rules/value-literals-of-correct-type.md +1 -1
  57. package/docs/rules/variables-are-input-types.md +1 -1
  58. package/docs/rules/variables-in-allowed-position.md +1 -1
  59. package/estree-parser/converter.d.ts +3 -2
  60. package/estree-parser/estree-ast.d.ts +18 -18
  61. package/estree-parser/utils.d.ts +2 -8
  62. package/index.d.ts +6 -2
  63. package/index.js +726 -723
  64. package/index.mjs +726 -717
  65. package/package.json +1 -1
  66. package/rules/alphabetize.d.ts +1 -0
  67. package/rules/graphql-js-validation.d.ts +1 -1
  68. package/rules/index.d.ts +1 -4
  69. package/rules/selection-set-depth.d.ts +1 -1
  70. package/sibling-operations.d.ts +3 -3
  71. package/testkit.d.ts +3 -3
  72. package/types.d.ts +24 -18
  73. package/utils.d.ts +14 -4
  74. package/configs/base.d.ts +0 -5
  75. package/configs/index.d.ts +0 -133
  76. package/configs/operations-all.d.ts +0 -19
  77. package/configs/operations-recommended.d.ts +0 -50
  78. package/configs/schema-all.d.ts +0 -15
  79. package/configs/schema-recommended.d.ts +0 -47
  80. package/graphql-ast.d.ts +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "GraphQL plugin for ESLint",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -10,6 +10,7 @@ export declare type AlphabetizeConfig = {
10
10
  selections?: typeof selectionsEnum;
11
11
  variables?: typeof variablesEnum;
12
12
  arguments?: typeof argumentsEnum;
13
+ definitions?: boolean;
13
14
  };
14
15
  declare const rule: GraphQLESLintRule<[AlphabetizeConfig]>;
15
16
  export default rule;
@@ -1,2 +1,2 @@
1
- import { GraphQLESLintRule } from '../types';
1
+ import type { GraphQLESLintRule } from '../types';
2
2
  export declare const GRAPHQL_JS_VALIDATIONS: Record<string, GraphQLESLintRule>;
package/rules/index.d.ts CHANGED
@@ -30,10 +30,7 @@ export declare const rules: {
30
30
  'require-description': import("..").GraphQLESLintRule<[import("./require-description").RequireDescriptionRuleConfig], false>;
31
31
  'require-field-of-type-query-in-mutation-result': import("..").GraphQLESLintRule<any[], false>;
32
32
  'require-id-when-available': import("..").GraphQLESLintRule<[import("./require-id-when-available").RequireIdWhenAvailableRuleConfig], true>;
33
- 'selection-set-depth': import("..").GraphQLESLintRule<[{
34
- maxDepth: number;
35
- ignore?: string[];
36
- }], false>;
33
+ 'selection-set-depth': import("..").GraphQLESLintRule<[import("./selection-set-depth").SelectionSetDepthRuleConfig], false>;
37
34
  'strict-id-in-types': import("..").GraphQLESLintRule<[import("./strict-id-in-types").StrictIdInTypesRuleConfig], false>;
38
35
  'unique-fragment-name': import("..").GraphQLESLintRule<any[], false>;
39
36
  'unique-operation-name': import("..").GraphQLESLintRule<any[], false>;
@@ -1,5 +1,5 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare type SelectionSetDepthRuleConfig = {
2
+ export declare type SelectionSetDepthRuleConfig = {
3
3
  maxDepth: number;
4
4
  ignore?: string[];
5
5
  };
@@ -11,12 +11,12 @@ export declare type OperationSource = {
11
11
  };
12
12
  export declare type SiblingOperations = {
13
13
  available: boolean;
14
- getOperations(): OperationSource[];
15
- getFragments(): FragmentSource[];
16
14
  getFragment(fragmentName: string): FragmentSource[];
15
+ getFragments(): FragmentSource[];
17
16
  getFragmentByType(typeName: string): FragmentSource[];
18
- getFragmentsInUse(baseOperation: OperationDefinitionNode | FragmentDefinitionNode | SelectionSetNode, recursive: boolean): FragmentDefinitionNode[];
17
+ getFragmentsInUse(baseOperation: OperationDefinitionNode | FragmentDefinitionNode | SelectionSetNode, recursive?: boolean): FragmentDefinitionNode[];
19
18
  getOperation(operationName: string): OperationSource[];
19
+ getOperations(): OperationSource[];
20
20
  getOperationByType(operationType: OperationTypeNode): OperationSource[];
21
21
  };
22
22
  export declare function getSiblingOperations(options: ParserOptions, gqlConfig: GraphQLConfig): SiblingOperations;
package/testkit.d.ts CHANGED
@@ -20,8 +20,8 @@ export declare class GraphQLRuleTester extends RuleTester {
20
20
  };
21
21
  constructor(parserOptions?: ParserOptions);
22
22
  fromMockFile(path: string): string;
23
- runGraphQLTests<Config>(name: string, rule: GraphQLESLintRule, tests: {
24
- valid: (string | GraphQLValidTestCase<Config>)[];
25
- invalid: GraphQLInvalidTestCase<Config>[];
23
+ runGraphQLTests<Options, WithTypeInfo extends boolean = false>(name: string, rule: GraphQLESLintRule<Options, WithTypeInfo>, tests: {
24
+ valid: (string | GraphQLValidTestCase<Options>)[];
25
+ invalid: GraphQLInvalidTestCase<Options>[];
26
26
  }): void;
27
27
  }
package/types.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { Rule, AST, Linter } from 'eslint';
2
- import { ASTNode, GraphQLSchema } from 'graphql';
3
- import { GraphQLParseOptions } from '@graphql-tools/utils';
4
- import { IExtensions, IGraphQLProject, DocumentPointer, SchemaPointer } from 'graphql-config';
5
- import { GraphQLESLintRuleListener } from './testkit';
6
- import { GraphQLESTreeNode } from './estree-parser';
7
- import { SiblingOperations } from './sibling-operations';
8
- import { getReachableTypes, getUsedFields } from './graphql-ast';
1
+ import type { Rule, AST, Linter } from 'eslint';
2
+ import type * as ESTree from 'estree';
3
+ import type { ASTNode, GraphQLSchema } from 'graphql';
4
+ import type { IExtensions, IGraphQLProject, DocumentPointer, SchemaPointer } from 'graphql-config';
5
+ import type { GraphQLParseOptions } from '@graphql-tools/utils';
6
+ import type { GraphQLESLintRuleListener } from './testkit';
7
+ import type { GraphQLESTreeNode } from './estree-parser';
8
+ import type { SiblingOperations } from './sibling-operations';
9
9
  export interface ParserOptions {
10
10
  schema?: SchemaPointer | Record<string, {
11
11
  headers: Record<string, string>;
@@ -27,22 +27,19 @@ export declare type ParserServices = {
27
27
  hasTypeInfo: boolean;
28
28
  schema: GraphQLSchema | null;
29
29
  siblingOperations: SiblingOperations;
30
- reachableTypes: typeof getReachableTypes;
31
- usedFields: typeof getUsedFields;
32
30
  };
33
31
  export declare type GraphQLESLintParseResult = Linter.ESLintParseResult & {
34
32
  services: ParserServices;
35
33
  };
34
+ declare type ReportDescriptorLocation = {
35
+ node: GraphQLESTreeNode<ASTNode>;
36
+ } | {
37
+ loc: AST.SourceLocation | ESTree.Position;
38
+ };
39
+ export declare type ReportDescriptor = Rule.ReportDescriptorMessage & Rule.ReportDescriptorOptions & ReportDescriptorLocation;
36
40
  export declare type GraphQLESLintRuleContext<Options = any[]> = Omit<Rule.RuleContext, 'parserServices' | 'report' | 'options'> & {
37
41
  options: Options;
38
- report(descriptor: Rule.ReportDescriptorMessage & Rule.ReportDescriptorOptions & ({
39
- node: GraphQLESTreeNode<ASTNode>;
40
- } | {
41
- loc: AST.SourceLocation | {
42
- line: number;
43
- column: number;
44
- };
45
- })): void;
42
+ report(descriptor: ReportDescriptor): void;
46
43
  parserServices?: ParserServices;
47
44
  };
48
45
  export declare type CategoryType = 'Schema' | 'Operations';
@@ -61,6 +58,7 @@ export declare type RuleDocsInfo<T> = {
61
58
  operations?: T;
62
59
  };
63
60
  graphQLJSRuleName?: string;
61
+ isDisabledForAllConfig?: true;
64
62
  };
65
63
  };
66
64
  export declare type GraphQLESLintRule<Options = any[], WithTypeInfo extends boolean = false> = {
@@ -68,3 +66,11 @@ export declare type GraphQLESLintRule<Options = any[], WithTypeInfo extends bool
68
66
  meta: Omit<Rule.RuleMetaData, 'docs'> & RuleDocsInfo<Options>;
69
67
  };
70
68
  export declare type ValueOf<T> = T[keyof T];
69
+ declare type Id<T> = {} & {
70
+ [P in keyof T]: T[P];
71
+ };
72
+ declare type OmitDistributive<T, K extends PropertyKey> = T extends object ? Id<OmitRecursively<T, K>> : T;
73
+ export declare type OmitRecursively<T extends object, K extends PropertyKey> = Omit<{
74
+ [P in keyof T]: OmitDistributive<T[P], K>;
75
+ }, K>;
76
+ export {};
package/utils.d.ts CHANGED
@@ -3,15 +3,13 @@ import type { AST } from 'eslint';
3
3
  import { Source as LoaderSource } from '@graphql-tools/utils';
4
4
  import { GraphQLESLintRuleContext } from './types';
5
5
  import { SiblingOperations } from './sibling-operations';
6
- import { ReachableTypes, UsedFields } from './graphql-ast';
6
+ import type * as ESTree from 'estree';
7
7
  export declare function requireSiblingsOperations(ruleName: string, context: GraphQLESLintRuleContext): SiblingOperations | never;
8
8
  export declare function requireGraphQLSchemaFromContext(ruleName: string, context: GraphQLESLintRuleContext): GraphQLSchema | never;
9
9
  export declare const logger: {
10
10
  error: (...args: any[]) => void;
11
11
  warn: (...args: any[]) => void;
12
12
  };
13
- export declare function requireReachableTypesFromContext(ruleName: string, context: GraphQLESLintRuleContext): ReachableTypes | never;
14
- export declare function requireUsedFieldsFromContext(ruleName: string, context: GraphQLESLintRuleContext): UsedFields | never;
15
13
  export declare const normalizePath: (path: string) => string;
16
14
  /**
17
15
  * https://github.com/prettier/eslint-plugin-prettier/blob/76bd45ece6d56eb52f75db6b4a1efdd2efb56392/eslint-plugin-prettier.js#L71
@@ -26,4 +24,16 @@ export declare const TYPES_KINDS: readonly [Kind.OBJECT_TYPE_DEFINITION, Kind.IN
26
24
  export declare type CaseStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE' | 'kebab-case';
27
25
  export declare const camelCase: (str: string) => string;
28
26
  export declare const convertCase: (style: CaseStyle, str: string) => string;
29
- export declare function getLocation(loc: Partial<AST.SourceLocation>, fieldName?: string): AST.SourceLocation;
27
+ export declare function getLocation(start: ESTree.Position, fieldName?: string): AST.SourceLocation;
28
+ export declare const REPORT_ON_FIRST_CHARACTER: {
29
+ column: number;
30
+ line: number;
31
+ };
32
+ export declare const ARRAY_DEFAULT_OPTIONS: {
33
+ readonly type: "array";
34
+ readonly uniqueItems: true;
35
+ readonly minItems: 1;
36
+ readonly items: {
37
+ readonly type: "string";
38
+ };
39
+ };
package/configs/base.d.ts DELETED
@@ -1,5 +0,0 @@
1
- declare const _default: {
2
- parser: string;
3
- plugins: string[];
4
- };
5
- export default _default;
@@ -1,133 +0,0 @@
1
- export declare const configs: {
2
- base: {
3
- parser: string;
4
- plugins: string[];
5
- };
6
- 'schema-recommended': {
7
- extends: string[];
8
- rules: {
9
- '@graphql-eslint/description-style': string;
10
- '@graphql-eslint/known-argument-names': string;
11
- '@graphql-eslint/known-directives': string;
12
- '@graphql-eslint/known-type-names': string;
13
- '@graphql-eslint/lone-schema-definition': string;
14
- '@graphql-eslint/naming-convention': (string | {
15
- types: string;
16
- FieldDefinition: string;
17
- InputValueDefinition: string;
18
- Argument: string;
19
- DirectiveDefinition: string;
20
- EnumValueDefinition: string;
21
- 'FieldDefinition[parent.name.value=Query]': {
22
- forbiddenPrefixes: string[];
23
- forbiddenSuffixes: string[];
24
- };
25
- 'FieldDefinition[parent.name.value=Mutation]': {
26
- forbiddenPrefixes: string[];
27
- forbiddenSuffixes: string[];
28
- };
29
- 'FieldDefinition[parent.name.value=Subscription]': {
30
- forbiddenPrefixes: string[];
31
- forbiddenSuffixes: string[];
32
- };
33
- })[];
34
- '@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
35
- '@graphql-eslint/no-hashtag-description': string;
36
- '@graphql-eslint/no-typename-prefix': string;
37
- '@graphql-eslint/no-unreachable-types': string;
38
- '@graphql-eslint/provided-required-arguments': string;
39
- '@graphql-eslint/require-deprecation-reason': string;
40
- '@graphql-eslint/require-description': (string | {
41
- types: boolean;
42
- DirectiveDefinition: boolean;
43
- })[];
44
- '@graphql-eslint/strict-id-in-types': string;
45
- '@graphql-eslint/unique-directive-names': string;
46
- '@graphql-eslint/unique-directive-names-per-location': string;
47
- '@graphql-eslint/unique-field-definition-names': string;
48
- '@graphql-eslint/unique-operation-types': string;
49
- '@graphql-eslint/unique-type-names': string;
50
- };
51
- };
52
- 'schema-all': {
53
- extends: string[];
54
- rules: {
55
- '@graphql-eslint/alphabetize': (string | {
56
- fields: string[];
57
- values: string[];
58
- arguments: string[];
59
- })[];
60
- '@graphql-eslint/input-name': string;
61
- '@graphql-eslint/no-scalar-result-type-on-mutation': string;
62
- '@graphql-eslint/require-deprecation-date': string;
63
- '@graphql-eslint/require-field-of-type-query-in-mutation-result': string;
64
- };
65
- };
66
- 'operations-recommended': {
67
- extends: string[];
68
- rules: {
69
- '@graphql-eslint/executable-definitions': string;
70
- '@graphql-eslint/fields-on-correct-type': string;
71
- '@graphql-eslint/fragments-on-composite-type': string;
72
- '@graphql-eslint/known-argument-names': string;
73
- '@graphql-eslint/known-directives': string;
74
- '@graphql-eslint/known-fragment-names': string;
75
- '@graphql-eslint/known-type-names': string;
76
- '@graphql-eslint/lone-anonymous-operation': string;
77
- '@graphql-eslint/naming-convention': (string | {
78
- VariableDefinition: string;
79
- OperationDefinition: {
80
- style: string;
81
- forbiddenPrefixes: string[];
82
- forbiddenSuffixes: string[];
83
- };
84
- FragmentDefinition: {
85
- style: string;
86
- forbiddenPrefixes: string[];
87
- forbiddenSuffixes: string[];
88
- };
89
- })[];
90
- '@graphql-eslint/no-anonymous-operations': string;
91
- '@graphql-eslint/no-deprecated': string;
92
- '@graphql-eslint/no-duplicate-fields': string;
93
- '@graphql-eslint/no-fragment-cycles': string;
94
- '@graphql-eslint/no-undefined-variables': string;
95
- '@graphql-eslint/no-unused-fragments': string;
96
- '@graphql-eslint/no-unused-variables': string;
97
- '@graphql-eslint/one-field-subscriptions': string;
98
- '@graphql-eslint/overlapping-fields-can-be-merged': string;
99
- '@graphql-eslint/possible-fragment-spread': string;
100
- '@graphql-eslint/provided-required-arguments': string;
101
- '@graphql-eslint/require-id-when-available': string;
102
- '@graphql-eslint/scalar-leafs': string;
103
- '@graphql-eslint/selection-set-depth': (string | {
104
- maxDepth: number;
105
- })[];
106
- '@graphql-eslint/unique-argument-names': string;
107
- '@graphql-eslint/unique-directive-names-per-location': string;
108
- '@graphql-eslint/unique-input-field-names': string;
109
- '@graphql-eslint/unique-variable-names': string;
110
- '@graphql-eslint/value-literals-of-correct-type': string;
111
- '@graphql-eslint/variables-are-input-types': string;
112
- '@graphql-eslint/variables-in-allowed-position': string;
113
- };
114
- };
115
- 'operations-all': {
116
- extends: string[];
117
- rules: {
118
- '@graphql-eslint/alphabetize': (string | {
119
- selections: string[];
120
- variables: string[];
121
- arguments: string[];
122
- })[];
123
- '@graphql-eslint/match-document-filename': (string | {
124
- query: string;
125
- mutation: string;
126
- subscription: string;
127
- fragment: string;
128
- })[];
129
- '@graphql-eslint/unique-fragment-name': string;
130
- '@graphql-eslint/unique-operation-name': string;
131
- };
132
- };
133
- };
@@ -1,19 +0,0 @@
1
- declare const _default: {
2
- extends: string[];
3
- rules: {
4
- '@graphql-eslint/alphabetize': (string | {
5
- selections: string[];
6
- variables: string[];
7
- arguments: string[];
8
- })[];
9
- '@graphql-eslint/match-document-filename': (string | {
10
- query: string;
11
- mutation: string;
12
- subscription: string;
13
- fragment: string;
14
- })[];
15
- '@graphql-eslint/unique-fragment-name': string;
16
- '@graphql-eslint/unique-operation-name': string;
17
- };
18
- };
19
- export default _default;
@@ -1,50 +0,0 @@
1
- declare const _default: {
2
- extends: string[];
3
- rules: {
4
- '@graphql-eslint/executable-definitions': string;
5
- '@graphql-eslint/fields-on-correct-type': string;
6
- '@graphql-eslint/fragments-on-composite-type': string;
7
- '@graphql-eslint/known-argument-names': string;
8
- '@graphql-eslint/known-directives': string;
9
- '@graphql-eslint/known-fragment-names': string;
10
- '@graphql-eslint/known-type-names': string;
11
- '@graphql-eslint/lone-anonymous-operation': string;
12
- '@graphql-eslint/naming-convention': (string | {
13
- VariableDefinition: string;
14
- OperationDefinition: {
15
- style: string;
16
- forbiddenPrefixes: string[];
17
- forbiddenSuffixes: string[];
18
- };
19
- FragmentDefinition: {
20
- style: string;
21
- forbiddenPrefixes: string[];
22
- forbiddenSuffixes: string[];
23
- };
24
- })[];
25
- '@graphql-eslint/no-anonymous-operations': string;
26
- '@graphql-eslint/no-deprecated': string;
27
- '@graphql-eslint/no-duplicate-fields': string;
28
- '@graphql-eslint/no-fragment-cycles': string;
29
- '@graphql-eslint/no-undefined-variables': string;
30
- '@graphql-eslint/no-unused-fragments': string;
31
- '@graphql-eslint/no-unused-variables': string;
32
- '@graphql-eslint/one-field-subscriptions': string;
33
- '@graphql-eslint/overlapping-fields-can-be-merged': string;
34
- '@graphql-eslint/possible-fragment-spread': string;
35
- '@graphql-eslint/provided-required-arguments': string;
36
- '@graphql-eslint/require-id-when-available': string;
37
- '@graphql-eslint/scalar-leafs': string;
38
- '@graphql-eslint/selection-set-depth': (string | {
39
- maxDepth: number;
40
- })[];
41
- '@graphql-eslint/unique-argument-names': string;
42
- '@graphql-eslint/unique-directive-names-per-location': string;
43
- '@graphql-eslint/unique-input-field-names': string;
44
- '@graphql-eslint/unique-variable-names': string;
45
- '@graphql-eslint/value-literals-of-correct-type': string;
46
- '@graphql-eslint/variables-are-input-types': string;
47
- '@graphql-eslint/variables-in-allowed-position': string;
48
- };
49
- };
50
- export default _default;
@@ -1,15 +0,0 @@
1
- declare const _default: {
2
- extends: string[];
3
- rules: {
4
- '@graphql-eslint/alphabetize': (string | {
5
- fields: string[];
6
- values: string[];
7
- arguments: string[];
8
- })[];
9
- '@graphql-eslint/input-name': string;
10
- '@graphql-eslint/no-scalar-result-type-on-mutation': string;
11
- '@graphql-eslint/require-deprecation-date': string;
12
- '@graphql-eslint/require-field-of-type-query-in-mutation-result': string;
13
- };
14
- };
15
- export default _default;
@@ -1,47 +0,0 @@
1
- declare const _default: {
2
- extends: string[];
3
- rules: {
4
- '@graphql-eslint/description-style': string;
5
- '@graphql-eslint/known-argument-names': string;
6
- '@graphql-eslint/known-directives': string;
7
- '@graphql-eslint/known-type-names': string;
8
- '@graphql-eslint/lone-schema-definition': string;
9
- '@graphql-eslint/naming-convention': (string | {
10
- types: string;
11
- FieldDefinition: string;
12
- InputValueDefinition: string;
13
- Argument: string;
14
- DirectiveDefinition: string;
15
- EnumValueDefinition: string;
16
- 'FieldDefinition[parent.name.value=Query]': {
17
- forbiddenPrefixes: string[];
18
- forbiddenSuffixes: string[];
19
- };
20
- 'FieldDefinition[parent.name.value=Mutation]': {
21
- forbiddenPrefixes: string[];
22
- forbiddenSuffixes: string[];
23
- };
24
- 'FieldDefinition[parent.name.value=Subscription]': {
25
- forbiddenPrefixes: string[];
26
- forbiddenSuffixes: string[];
27
- };
28
- })[];
29
- '@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
30
- '@graphql-eslint/no-hashtag-description': string;
31
- '@graphql-eslint/no-typename-prefix': string;
32
- '@graphql-eslint/no-unreachable-types': string;
33
- '@graphql-eslint/provided-required-arguments': string;
34
- '@graphql-eslint/require-deprecation-reason': string;
35
- '@graphql-eslint/require-description': (string | {
36
- types: boolean;
37
- DirectiveDefinition: boolean;
38
- })[];
39
- '@graphql-eslint/strict-id-in-types': string;
40
- '@graphql-eslint/unique-directive-names': string;
41
- '@graphql-eslint/unique-directive-names-per-location': string;
42
- '@graphql-eslint/unique-field-definition-names': string;
43
- '@graphql-eslint/unique-operation-types': string;
44
- '@graphql-eslint/unique-type-names': string;
45
- };
46
- };
47
- export default _default;
package/graphql-ast.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- import { SiblingOperations } from './sibling-operations';
3
- export declare type ReachableTypes = Set<string>;
4
- export declare function getReachableTypes(schema: GraphQLSchema): ReachableTypes;
5
- export declare type UsedFields = Record<string, Set<string>>;
6
- export declare function getUsedFields(schema: GraphQLSchema, operations: SiblingOperations): UsedFields;