@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/README.md +5 -1
- package/configs/index.d.ts +31 -35
- package/configs/operations-recommended.d.ts +10 -13
- package/configs/schema-all.d.ts +1 -6
- package/configs/schema-recommended.d.ts +20 -16
- package/docs/README.md +3 -3
- package/docs/rules/description-style.md +1 -1
- package/docs/rules/naming-convention.md +168 -42
- package/docs/rules/no-root-type.md +3 -14
- package/docs/rules/possible-type-extension.md +0 -2
- package/docs/rules/require-description.md +37 -21
- package/index.js +142 -132
- package/index.mjs +142 -132
- package/package.json +1 -1
- package/rules/index.d.ts +104 -113
- package/rules/naming-convention.d.ts +2 -4
- package/rules/no-root-type.d.ts +1 -1
- package/rules/require-description.d.ts +2 -3
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
|
-
|
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
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
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: ("
|
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
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
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
|
-
|
33
|
-
|
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;
|
package/rules/no-root-type.d.ts
CHANGED
@@ -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
|
-
|
8
|
-
|
9
|
-
};
|
7
|
+
} & {
|
8
|
+
[key in AllowedKind]?: boolean;
|
10
9
|
};
|
11
10
|
declare const rule: GraphQLESLintRule<[RequireDescriptionRuleConfig]>;
|
12
11
|
export default rule;
|