@graphql-eslint/eslint-plugin 3.0.0-alpha-698204a.0 → 3.0.0-alpha-0a996de.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.
package/rules/index.d.ts CHANGED
@@ -44,112 +44,104 @@ export declare const rules: {
44
44
  forbiddenPrefixes?: string[];
45
45
  forbiddenSuffixes?: string[];
46
46
  };
47
- fields?: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
47
+ } & {
48
+ [x: `OperationDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
48
49
  style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
49
50
  suffix?: string;
50
51
  prefix?: string;
51
52
  forbiddenPrefixes?: string[];
52
53
  forbiddenSuffixes?: string[];
53
54
  };
54
- overrides?: {
55
- [x: `OperationDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
56
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
57
- suffix?: string;
58
- prefix?: string;
59
- forbiddenPrefixes?: string[];
60
- forbiddenSuffixes?: string[];
61
- };
62
- [x: `VariableDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
63
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
64
- suffix?: string;
65
- prefix?: string;
66
- forbiddenPrefixes?: string[];
67
- forbiddenSuffixes?: string[];
68
- };
69
- [x: `Argument${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
70
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
71
- suffix?: string;
72
- prefix?: string;
73
- forbiddenPrefixes?: string[];
74
- forbiddenSuffixes?: string[];
75
- };
76
- [x: `FragmentDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
77
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
78
- suffix?: string;
79
- prefix?: string;
80
- forbiddenPrefixes?: string[];
81
- forbiddenSuffixes?: string[];
82
- };
83
- [x: `ScalarTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
84
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
85
- suffix?: string;
86
- prefix?: string;
87
- forbiddenPrefixes?: string[];
88
- forbiddenSuffixes?: string[];
89
- };
90
- [x: `ObjectTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
91
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
92
- suffix?: string;
93
- prefix?: string;
94
- forbiddenPrefixes?: string[];
95
- forbiddenSuffixes?: string[];
96
- };
97
- [x: `FieldDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
98
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
99
- suffix?: string;
100
- prefix?: string;
101
- forbiddenPrefixes?: string[];
102
- forbiddenSuffixes?: string[];
103
- };
104
- [x: `InputValueDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
105
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
106
- suffix?: string;
107
- prefix?: string;
108
- forbiddenPrefixes?: string[];
109
- forbiddenSuffixes?: string[];
110
- };
111
- [x: `InterfaceTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
112
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
113
- suffix?: string;
114
- prefix?: string;
115
- forbiddenPrefixes?: string[];
116
- forbiddenSuffixes?: string[];
117
- };
118
- [x: `UnionTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
119
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
120
- suffix?: string;
121
- prefix?: string;
122
- forbiddenPrefixes?: string[];
123
- forbiddenSuffixes?: string[];
124
- };
125
- [x: `EnumTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
126
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
127
- suffix?: string;
128
- prefix?: string;
129
- forbiddenPrefixes?: string[];
130
- forbiddenSuffixes?: string[];
131
- };
132
- [x: `EnumValueDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
133
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
134
- suffix?: string;
135
- prefix?: string;
136
- forbiddenPrefixes?: string[];
137
- forbiddenSuffixes?: string[];
138
- };
139
- [x: `InputObjectTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
140
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
141
- suffix?: string;
142
- prefix?: string;
143
- forbiddenPrefixes?: string[];
144
- forbiddenSuffixes?: string[];
145
- };
146
- [x: `DirectiveDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
147
- style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
148
- suffix?: string;
149
- prefix?: string;
150
- forbiddenPrefixes?: string[];
151
- forbiddenSuffixes?: string[];
152
- };
55
+ [x: `VariableDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
56
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
57
+ suffix?: string;
58
+ prefix?: string;
59
+ forbiddenPrefixes?: string[];
60
+ forbiddenSuffixes?: string[];
61
+ };
62
+ [x: `Argument${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
63
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
64
+ suffix?: string;
65
+ prefix?: string;
66
+ forbiddenPrefixes?: string[];
67
+ forbiddenSuffixes?: string[];
68
+ };
69
+ [x: `FragmentDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
70
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
71
+ suffix?: string;
72
+ prefix?: string;
73
+ forbiddenPrefixes?: string[];
74
+ forbiddenSuffixes?: string[];
75
+ };
76
+ [x: `ScalarTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
77
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
78
+ suffix?: string;
79
+ prefix?: string;
80
+ forbiddenPrefixes?: string[];
81
+ forbiddenSuffixes?: string[];
82
+ };
83
+ [x: `ObjectTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
84
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
85
+ suffix?: string;
86
+ prefix?: string;
87
+ forbiddenPrefixes?: string[];
88
+ forbiddenSuffixes?: string[];
89
+ };
90
+ [x: `FieldDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
91
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
92
+ suffix?: string;
93
+ prefix?: string;
94
+ forbiddenPrefixes?: string[];
95
+ forbiddenSuffixes?: string[];
96
+ };
97
+ [x: `InputValueDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
98
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
99
+ suffix?: string;
100
+ prefix?: string;
101
+ forbiddenPrefixes?: string[];
102
+ forbiddenSuffixes?: string[];
103
+ };
104
+ [x: `InterfaceTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
105
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
106
+ suffix?: string;
107
+ prefix?: string;
108
+ forbiddenPrefixes?: string[];
109
+ forbiddenSuffixes?: string[];
110
+ };
111
+ [x: `UnionTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
112
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
113
+ suffix?: string;
114
+ prefix?: string;
115
+ forbiddenPrefixes?: string[];
116
+ forbiddenSuffixes?: string[];
117
+ };
118
+ [x: `EnumTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
119
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
120
+ suffix?: string;
121
+ prefix?: string;
122
+ forbiddenPrefixes?: string[];
123
+ forbiddenSuffixes?: string[];
124
+ };
125
+ [x: `EnumValueDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
126
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
127
+ suffix?: string;
128
+ prefix?: string;
129
+ forbiddenPrefixes?: string[];
130
+ forbiddenSuffixes?: string[];
131
+ };
132
+ [x: `InputObjectTypeDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
133
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
134
+ suffix?: string;
135
+ prefix?: string;
136
+ forbiddenPrefixes?: string[];
137
+ forbiddenSuffixes?: string[];
138
+ };
139
+ [x: `DirectiveDefinition${string}`]: ("PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case") | {
140
+ style?: "PascalCase" | "camelCase" | "UPPER_CASE" | "snake_case";
141
+ suffix?: string;
142
+ prefix?: string;
143
+ forbiddenPrefixes?: string[];
144
+ forbiddenSuffixes?: string[];
153
145
  };
154
146
  }], false>;
155
147
  'no-anonymous-operations': import("..").GraphQLESLintRule<any[], false>;
@@ -158,7 +150,7 @@ export declare const rules: {
158
150
  'no-duplicate-fields': import("..").GraphQLESLintRule<any[], false>;
159
151
  'no-hashtag-description': import("..").GraphQLESLintRule<any[], false>;
160
152
  'no-root-type': import("..").GraphQLESLintRule<[{
161
- disallow: ("query" | "mutation" | "subscription")[];
153
+ disallow: ("mutation" | "subscription")[];
162
154
  }], false>;
163
155
  'no-scalar-result-type-on-mutation': import("..").GraphQLESLintRule<any[], false>;
164
156
  'no-typename-prefix': import("..").GraphQLESLintRule<any[], false>;
@@ -170,18 +162,17 @@ export declare const rules: {
170
162
  'require-deprecation-reason': import("..").GraphQLESLintRule<any[], false>;
171
163
  'require-description': import("..").GraphQLESLintRule<[{
172
164
  types?: boolean;
173
- overrides?: {
174
- ScalarTypeDefinition?: boolean;
175
- ObjectTypeDefinition?: boolean;
176
- FieldDefinition?: boolean;
177
- InputValueDefinition?: boolean;
178
- InterfaceTypeDefinition?: boolean;
179
- UnionTypeDefinition?: boolean;
180
- EnumTypeDefinition?: boolean;
181
- EnumValueDefinition?: boolean;
182
- InputObjectTypeDefinition?: boolean;
183
- DirectiveDefinition?: boolean;
184
- };
165
+ } & {
166
+ ScalarTypeDefinition?: boolean;
167
+ ObjectTypeDefinition?: boolean;
168
+ FieldDefinition?: boolean;
169
+ InputValueDefinition?: boolean;
170
+ InterfaceTypeDefinition?: boolean;
171
+ UnionTypeDefinition?: boolean;
172
+ EnumTypeDefinition?: boolean;
173
+ EnumValueDefinition?: boolean;
174
+ InputObjectTypeDefinition?: boolean;
175
+ DirectiveDefinition?: boolean;
185
176
  }], false>;
186
177
  'require-field-of-type-query-in-mutation-result': import("..").GraphQLESLintRule<any[], false>;
187
178
  'require-id-when-available': import("..").GraphQLESLintRule<[{
@@ -29,10 +29,8 @@ declare type NamingConventionRuleConfig = {
29
29
  allowLeadingUnderscore?: boolean;
30
30
  allowTrailingUnderscore?: boolean;
31
31
  types?: Options;
32
- fields?: Options;
33
- overrides?: {
34
- [key in `${AllowedKind}${string}`]?: Options;
35
- };
32
+ } & {
33
+ [key in `${AllowedKind}${string}`]?: Options;
36
34
  };
37
35
  declare const rule: GraphQLESLintRule<[NamingConventionRuleConfig]>;
38
36
  export default rule;
@@ -1,5 +1,5 @@
1
1
  import { GraphQLESLintRule } from '../types';
2
- declare const ROOT_TYPES: ('query' | 'mutation' | 'subscription')[];
2
+ declare const ROOT_TYPES: ('mutation' | 'subscription')[];
3
3
  declare type NoRootTypeConfig = {
4
4
  disallow: typeof ROOT_TYPES;
5
5
  };
@@ -4,9 +4,8 @@ declare const ALLOWED_KINDS: readonly [Kind.OBJECT_TYPE_DEFINITION, Kind.INTERFA
4
4
  declare type AllowedKind = typeof ALLOWED_KINDS[number];
5
5
  declare type RequireDescriptionRuleConfig = {
6
6
  types?: boolean;
7
- overrides?: {
8
- [key in AllowedKind]?: boolean;
9
- };
7
+ } & {
8
+ [key in AllowedKind]?: boolean;
10
9
  };
11
10
  declare const rule: GraphQLESLintRule<[RequireDescriptionRuleConfig]>;
12
11
  export default rule;