@@ -222,6 +222,21 @@ ruleTester.run<RuleOptions>('naming-convention', rule, {
222
222
}
223
223
` ,
224
224
} ,
225
+ {
226
+ name : '`allowLeadingUnderscore` and `allowTrailingUnderscore` should not conflict with `ignorePattern`' ,
227
+ code : /* GraphQL */ `
228
+ type SomeType {
229
+ _someField_: Boolean!
230
+ }
231
+ ` ,
232
+ options : [
233
+ {
234
+ 'FieldDefinition[parent.name.value=SomeType]' : {
235
+ ignorePattern : '.*someField.*' ,
236
+ } ,
237
+ } ,
238
+ ] ,
239
+ } ,
225
240
] ,
226
241
invalid : [
227
242
{
@@ -258,24 +273,12 @@ ruleTester.run<RuleOptions>('naming-convention', rule, {
258
273
} ,
259
274
] ,
260
275
errors : [
261
- {
262
- message : 'Input "_idOperatorsFilterFindManyUserInput" should be in PascalCase format' ,
263
- } ,
264
- {
265
- message : 'Input "_idOperatorsFilterFindOneUserInput" should be in PascalCase format' ,
266
- } ,
267
- {
268
- message : 'Input "_idOperatorsFilterRemoveManyUserInput" should be in PascalCase format' ,
269
- } ,
270
- {
271
- message : 'Input "_idOperatorsFilterRemoveOneUserInput" should be in PascalCase format' ,
272
- } ,
273
- {
274
- message : 'Input "_idOperatorsFilterUpdateManyUserInput" should be in PascalCase format' ,
275
- } ,
276
- {
277
- message : 'Input "_idOperatorsFilterUpdateOneUserInput" should be in PascalCase format' ,
278
- } ,
276
+ { message : 'Input "_idOperatorsFilterFindManyUserInput" should be in PascalCase format' } ,
277
+ { message : 'Input "_idOperatorsFilterFindOneUserInput" should be in PascalCase format' } ,
278
+ { message : 'Input "_idOperatorsFilterRemoveManyUserInput" should be in PascalCase format' } ,
279
+ { message : 'Input "_idOperatorsFilterRemoveOneUserInput" should be in PascalCase format' } ,
280
+ { message : 'Input "_idOperatorsFilterUpdateManyUserInput" should be in PascalCase format' } ,
281
+ { message : 'Input "_idOperatorsFilterUpdateOneUserInput" should be in PascalCase format' } ,
279
282
{ message : 'Input "_idOperatorsFilterUserInput" should be in PascalCase format' } ,
280
283
{ message : 'Enum value "male" should be in UPPER_CASE format' } ,
281
284
{ message : 'Enum value "female" should be in UPPER_CASE format' } ,
0 commit comments