@graphql-eslint/eslint-plugin 3.0.0-alpha-698204a.0 → 3.0.0-alpha-2918431.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/index.mjs CHANGED
@@ -33,20 +33,18 @@ const schemaRecommendedConfig = {
33
33
  {
34
34
  types: 'PascalCase',
35
35
  fields: 'camelCase',
36
- overrides: {
37
- EnumValueDefinition: 'UPPER_CASE',
38
- 'FieldDefinition[parent.name.value=Query]': {
39
- forbiddenPrefixes: ['query', 'get'],
40
- forbiddenSuffixes: ['Query'],
41
- },
42
- 'FieldDefinition[parent.name.value=Mutation]': {
43
- forbiddenPrefixes: ['mutation'],
44
- forbiddenSuffixes: ['Mutation'],
45
- },
46
- 'FieldDefinition[parent.name.value=Subscription]': {
47
- forbiddenPrefixes: ['subscription'],
48
- forbiddenSuffixes: ['Subscription'],
49
- },
36
+ EnumValueDefinition: 'UPPER_CASE',
37
+ 'FieldDefinition[parent.name.value=Query]': {
38
+ forbiddenPrefixes: ['query', 'get'],
39
+ forbiddenSuffixes: ['Query'],
40
+ },
41
+ 'FieldDefinition[parent.name.value=Mutation]': {
42
+ forbiddenPrefixes: ['mutation'],
43
+ forbiddenSuffixes: ['Mutation'],
44
+ },
45
+ 'FieldDefinition[parent.name.value=Subscription]': {
46
+ forbiddenPrefixes: ['subscription'],
47
+ forbiddenSuffixes: ['Subscription'],
50
48
  },
51
49
  },
52
50
  ],
@@ -86,7 +84,7 @@ const schemaAllConfig = {
86
84
  '@graphql-eslint/no-scalar-result-type-on-mutation': 'error',
87
85
  '@graphql-eslint/no-unused-fields': 'off',
88
86
  '@graphql-eslint/require-deprecation-date': 'error',
89
- '@graphql-eslint/require-description': ['error', { types: true, overrides: { DirectiveDefinition: true } }],
87
+ '@graphql-eslint/require-description': ['error', { types: true, DirectiveDefinition: true }],
90
88
  '@graphql-eslint/require-field-of-type-query-in-mutation-result': 'error',
91
89
  },
92
90
  };
@@ -108,16 +106,14 @@ const operationsRecommendedConfig = {
108
106
  '@graphql-eslint/naming-convention': [
109
107
  'error',
110
108
  {
111
- overrides: {
112
- Argument: 'camelCase',
113
- VariableDefinition: 'camelCase',
114
- OperationDefinition: {
115
- style: 'PascalCase',
116
- forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'],
117
- forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'],
118
- },
119
- FragmentDefinition: { style: 'PascalCase', forbiddenPrefixes: ['Fragment'], forbiddenSuffixes: ['Fragment'] },
120
- },
109
+ Argument: 'camelCase',
110
+ VariableDefinition: 'camelCase',
111
+ OperationDefinition: {
112
+ style: 'PascalCase',
113
+ forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'],
114
+ forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'],
115
+ },
116
+ FragmentDefinition: { style: 'PascalCase', forbiddenPrefixes: ['Fragment'], forbiddenSuffixes: ['Fragment'] },
121
117
  },
122
118
  ],
123
119
  '@graphql-eslint/no-anonymous-operations': 'error',
@@ -906,23 +902,21 @@ const rule$1 = {
906
902
  properties: {
907
903
  style: {
908
904
  enum: ['block', 'inline'],
909
- default: 'inline',
905
+ default: 'block',
910
906
  },
911
907
  },
912
908
  },
913
909
  ],
914
910
  },
915
911
  create(context) {
916
- const { style } = context.options[0] || { style: 'inline' };
917
- const wrongDescriptionType = style === 'block' ? 'inline' : 'block';
912
+ const { style = 'block' } = context.options[0] || {};
913
+ const isBlock = style === 'block';
918
914
  return {
919
- '[description.type="StringValue"]': node => {
920
- if (node.description.block !== (style === 'block')) {
921
- context.report({
922
- loc: getLocation(node.description.loc),
923
- message: `Unexpected ${wrongDescriptionType} description`,
924
- });
925
- }
915
+ [`.description[type=StringValue][block!=${isBlock}]`](node) {
916
+ context.report({
917
+ loc: getLocation(node.loc),
918
+ message: `Unexpected ${isBlock ? 'inline' : 'block'} description`,
919
+ });
926
920
  },
927
921
  };
928
922
  },
@@ -1312,38 +1306,34 @@ const rule$4 = {
1312
1306
  {
1313
1307
  types: 'PascalCase',
1314
1308
  fields: 'camelCase',
1315
- overrides: {
1316
- EnumValueDefinition: 'UPPER_CASE',
1317
- 'FieldDefinition[parent.name.value=Query]': {
1318
- forbiddenPrefixes: ['query', 'get'],
1319
- forbiddenSuffixes: ['Query'],
1320
- },
1321
- 'FieldDefinition[parent.name.value=Mutation]': {
1322
- forbiddenPrefixes: ['mutation'],
1323
- forbiddenSuffixes: ['Mutation'],
1324
- },
1325
- 'FieldDefinition[parent.name.value=Subscription]': {
1326
- forbiddenPrefixes: ['subscription'],
1327
- forbiddenSuffixes: ['Subscription'],
1328
- },
1309
+ EnumValueDefinition: 'UPPER_CASE',
1310
+ 'FieldDefinition[parent.name.value=Query]': {
1311
+ forbiddenPrefixes: ['query', 'get'],
1312
+ forbiddenSuffixes: ['Query'],
1313
+ },
1314
+ 'FieldDefinition[parent.name.value=Mutation]': {
1315
+ forbiddenPrefixes: ['mutation'],
1316
+ forbiddenSuffixes: ['Mutation'],
1317
+ },
1318
+ 'FieldDefinition[parent.name.value=Subscription]': {
1319
+ forbiddenPrefixes: ['subscription'],
1320
+ forbiddenSuffixes: ['Subscription'],
1329
1321
  },
1330
1322
  },
1331
1323
  ],
1332
1324
  operations: [
1333
1325
  {
1334
- overrides: {
1335
- Argument: 'camelCase',
1336
- VariableDefinition: 'camelCase',
1337
- OperationDefinition: {
1338
- style: 'PascalCase',
1339
- forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'],
1340
- forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'],
1341
- },
1342
- FragmentDefinition: {
1343
- style: 'PascalCase',
1344
- forbiddenPrefixes: ['Fragment'],
1345
- forbiddenSuffixes: ['Fragment'],
1346
- },
1326
+ Argument: 'camelCase',
1327
+ VariableDefinition: 'camelCase',
1328
+ OperationDefinition: {
1329
+ style: 'PascalCase',
1330
+ forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'],
1331
+ forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'],
1332
+ },
1333
+ FragmentDefinition: {
1334
+ style: 'PascalCase',
1335
+ forbiddenPrefixes: ['Fragment'],
1336
+ forbiddenSuffixes: ['Fragment'],
1347
1337
  },
1348
1338
  },
1349
1339
  ],
@@ -1383,14 +1373,6 @@ const rule$4 = {
1383
1373
  type: 'object',
1384
1374
  additionalProperties: false,
1385
1375
  properties: {
1386
- types: {
1387
- ...schemaOption$1,
1388
- description: `Includes:\n\n${TYPES_KINDS.map(kind => `- [${kind}](https://spec.graphql.org/October2021/#${kind})`).join('\n')}`,
1389
- },
1390
- fields: {
1391
- ...schemaOption$1,
1392
- description: `Includes:\n\n${FIELDS_KINDS.map(kind => `- [${kind}](https://spec.graphql.org/October2021/#${kind})`).join('\n')}`,
1393
- },
1394
1376
  allowLeadingUnderscore: {
1395
1377
  type: 'boolean',
1396
1378
  default: false,
@@ -1399,35 +1381,42 @@ const rule$4 = {
1399
1381
  type: 'boolean',
1400
1382
  default: false,
1401
1383
  },
1402
- overrides: {
1403
- type: 'object',
1404
- additionalProperties: false,
1405
- description: [
1406
- 'May contain the following `ASTNode` names:',
1407
- '',
1408
- ...ALLOWED_KINDS.map(kind => `- [${kind}](https://spec.graphql.org/October2021/#${kind})`),
1409
- '',
1410
- "> It's also possible to use a [`selector`](https://eslint.org/docs/developer-guide/selectors) that starts with `ASTNode` name",
1411
- '>',
1412
- '> Example: pattern property `FieldDefinition[parent.name.value=Query]` will match only fields for type `Query`',
1413
- ].join('\n'),
1414
- patternProperties: {
1415
- [`^(${ALLOWED_KINDS.join('|')})(.+)?$`]: schemaOption$1,
1416
- },
1384
+ types: {
1385
+ ...schemaOption$1,
1386
+ description: `Includes:\n\n${TYPES_KINDS.map(kind => `- \`${kind}\``).join('\n')}`,
1417
1387
  },
1418
- },
1388
+ fields: {
1389
+ ...schemaOption$1,
1390
+ description: `Includes:\n\n${FIELDS_KINDS.map(kind => `- \`${kind}\``).join('\n')}`,
1391
+ },
1392
+ ...Object.fromEntries(ALLOWED_KINDS.map(kind => [
1393
+ kind,
1394
+ {
1395
+ ...schemaOption$1,
1396
+ description: `Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#${kind}).`,
1397
+ },
1398
+ ])),
1399
+ },
1400
+ patternProperties: {
1401
+ [`^(${ALLOWED_KINDS.join('|')})(.+)?$`]: schemaOption$1,
1402
+ },
1403
+ description: [
1404
+ "> It's possible to use a [`selector`](https://eslint.org/docs/developer-guide/selectors) that starts with allowed `ASTNode` names which are described below.",
1405
+ '>',
1406
+ '> Paste or drop code into the editor in [ASTExplorer](https://astexplorer.net) and inspect the generated AST to compose your selector.',
1407
+ '>',
1408
+ '> Example: pattern property `FieldDefinition[parent.name.value=Query]` will match only fields for type `Query`.',
1409
+ ].join('\n'),
1419
1410
  },
1420
1411
  },
1421
1412
  },
1422
1413
  create(context) {
1423
- const options = {
1424
- overrides: {},
1425
- ...context.options[0],
1426
- };
1414
+ const options = context.options[0] || {};
1415
+ const { allowLeadingUnderscore, allowTrailingUnderscore, types, fields, ...restOptions } = options;
1427
1416
  function normalisePropertyOption(kind) {
1428
- let style = options.overrides[kind];
1417
+ let style = options[kind];
1429
1418
  if (!style) {
1430
- style = TYPES_KINDS.includes(kind) ? options.types : options.fields;
1419
+ style = TYPES_KINDS.includes(kind) ? types : fields;
1431
1420
  }
1432
1421
  return typeof style === 'object' ? style : { style };
1433
1422
  }
@@ -1448,10 +1437,10 @@ const rule$4 = {
1448
1437
  }
1449
1438
  function getErrorMessage() {
1450
1439
  let name = nodeName;
1451
- if (options.allowLeadingUnderscore) {
1440
+ if (allowLeadingUnderscore) {
1452
1441
  name = name.replace(/^_*/, '');
1453
1442
  }
1454
- if (options.allowTrailingUnderscore) {
1443
+ if (allowTrailingUnderscore) {
1455
1444
  name = name.replace(/_*$/, '');
1456
1445
  }
1457
1446
  if (prefix && !name.startsWith(prefix)) {
@@ -1485,15 +1474,13 @@ const rule$4 = {
1485
1474
  });
1486
1475
  };
1487
1476
  const listeners = {};
1488
- if (!options.allowLeadingUnderscore) {
1477
+ if (!allowLeadingUnderscore) {
1489
1478
  listeners['Name[value=/^_/]:matches([parent.kind!=Field], [parent.kind=Field][parent.alias])'] = checkUnderscore;
1490
1479
  }
1491
- if (!options.allowTrailingUnderscore) {
1480
+ if (!allowTrailingUnderscore) {
1492
1481
  listeners['Name[value=/_$/]:matches([parent.kind!=Field], [parent.kind=Field][parent.alias])'] = checkUnderscore;
1493
1482
  }
1494
- const selectors = new Set([options.types && TYPES_KINDS, options.fields && FIELDS_KINDS, Object.keys(options.overrides)]
1495
- .flat()
1496
- .filter(Boolean));
1483
+ const selectors = new Set([types && TYPES_KINDS, fields && FIELDS_KINDS, Object.keys(restOptions)].flat().filter(Boolean));
1497
1484
  for (const selector of selectors) {
1498
1485
  listeners[selector] = checkNode(selector);
1499
1486
  }
@@ -1898,18 +1885,18 @@ const rule$9 = {
1898
1885
  },
1899
1886
  };
1900
1887
 
1901
- const ROOT_TYPES = ['query', 'mutation', 'subscription'];
1888
+ const ROOT_TYPES = ['mutation', 'subscription'];
1902
1889
  const rule$a = {
1903
1890
  meta: {
1904
1891
  type: 'suggestion',
1905
1892
  docs: {
1906
1893
  category: 'Schema',
1907
- description: 'Disallow using root types for `read-only` or `write-only` schemas.',
1894
+ description: 'Disallow using root types `mutation` and/or `subscription`.',
1908
1895
  url: 'https://github.com/dotansimha/graphql-eslint/blob/master/docs/rules/no-root-type.md',
1909
1896
  requiresSchema: true,
1910
1897
  examples: [
1911
1898
  {
1912
- title: 'Incorrect (`read-only` schema)',
1899
+ title: 'Incorrect',
1913
1900
  usage: [{ disallow: ['mutation', 'subscription'] }],
1914
1901
  code: /* GraphQL */ `
1915
1902
  type Mutation {
@@ -1918,16 +1905,7 @@ const rule$a = {
1918
1905
  `,
1919
1906
  },
1920
1907
  {
1921
- title: 'Incorrect (`write-only` schema)',
1922
- usage: [{ disallow: ['query'] }],
1923
- code: /* GraphQL */ `
1924
- type Query {
1925
- users: [User!]!
1926
- }
1927
- `,
1928
- },
1929
- {
1930
- title: 'Correct (`read-only` schema)',
1908
+ title: 'Correct',
1931
1909
  usage: [{ disallow: ['mutation', 'subscription'] }],
1932
1910
  code: /* GraphQL */ `
1933
1911
  type Query {
@@ -1962,7 +1940,6 @@ const rule$a = {
1962
1940
  const schema = requireGraphQLSchemaFromContext('no-root-type', context);
1963
1941
  const disallow = new Set(context.options[0].disallow);
1964
1942
  const rootTypeNames = [
1965
- disallow.has('query') && schema.getQueryType(),
1966
1943
  disallow.has('mutation') && schema.getMutationType(),
1967
1944
  disallow.has('subscription') && schema.getSubscriptionType(),
1968
1945
  ]
@@ -2542,7 +2519,7 @@ const rule$h = {
2542
2519
  examples: [
2543
2520
  {
2544
2521
  title: 'Incorrect',
2545
- usage: [{ types: true, overrides: { FieldDefinition: true } }],
2522
+ usage: [{ types: true, FieldDefinition: true }],
2546
2523
  code: /* GraphQL */ `
2547
2524
  type someTypeName {
2548
2525
  name: String
@@ -2551,7 +2528,7 @@ const rule$h = {
2551
2528
  },
2552
2529
  {
2553
2530
  title: 'Correct',
2554
- usage: [{ types: true, overrides: { FieldDefinition: true } }],
2531
+ usage: [{ types: true, FieldDefinition: true }],
2555
2532
  code: /* GraphQL */ `
2556
2533
  """
2557
2534
  Some type description
@@ -2568,9 +2545,7 @@ const rule$h = {
2568
2545
  configOptions: [
2569
2546
  {
2570
2547
  types: true,
2571
- overrides: {
2572
- [Kind.DIRECTIVE_DEFINITION]: true,
2573
- },
2548
+ [Kind.DIRECTIVE_DEFINITION]: true,
2574
2549
  },
2575
2550
  ],
2576
2551
  },
@@ -2589,22 +2564,23 @@ const rule$h = {
2589
2564
  properties: {
2590
2565
  types: {
2591
2566
  type: 'boolean',
2592
- description: `Includes:\n\n${TYPES_KINDS.map(kind => `- [${kind}](https://spec.graphql.org/October2021/#${kind})`).join('\n')}`,
2593
- },
2594
- overrides: {
2595
- type: 'object',
2596
- description: 'Configuration for precise `ASTNode`',
2597
- additionalProperties: false,
2598
- properties: Object.fromEntries(ALLOWED_KINDS$1.map(kind => [kind, { type: 'boolean' }])),
2567
+ description: `Includes:\n\n${TYPES_KINDS.map(kind => `- \`${kind}\``).join('\n')}`,
2599
2568
  },
2569
+ ...Object.fromEntries([...ALLOWED_KINDS$1].sort().map(kind => [
2570
+ kind,
2571
+ {
2572
+ type: 'boolean',
2573
+ description: `Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#${kind}).`,
2574
+ },
2575
+ ])),
2600
2576
  },
2601
2577
  },
2602
2578
  },
2603
2579
  },
2604
2580
  create(context) {
2605
- const { types, overrides = {} } = context.options[0];
2581
+ const { types, ...restOptions } = context.options[0];
2606
2582
  const kinds = new Set(types ? TYPES_KINDS : []);
2607
- for (const [kind, isEnabled] of Object.entries(overrides)) {
2583
+ for (const [kind, isEnabled] of Object.entries(restOptions)) {
2608
2584
  if (isEnabled) {
2609
2585
  kinds.add(kind);
2610
2586
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.0.0-alpha-698204a.0",
3
+ "version": "3.0.0-alpha-2918431.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
package/rules/index.d.ts CHANGED
@@ -51,105 +51,104 @@ export declare const rules: {
51
51
  forbiddenPrefixes?: string[];
52
52
  forbiddenSuffixes?: string[];
53
53
  };
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
- };
54
+ } & {
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[];
153
152
  };
154
153
  }], false>;
155
154
  'no-anonymous-operations': import("..").GraphQLESLintRule<any[], false>;
@@ -158,7 +157,7 @@ export declare const rules: {
158
157
  'no-duplicate-fields': import("..").GraphQLESLintRule<any[], false>;
159
158
  'no-hashtag-description': import("..").GraphQLESLintRule<any[], false>;
160
159
  'no-root-type': import("..").GraphQLESLintRule<[{
161
- disallow: ("query" | "mutation" | "subscription")[];
160
+ disallow: ("mutation" | "subscription")[];
162
161
  }], false>;
163
162
  'no-scalar-result-type-on-mutation': import("..").GraphQLESLintRule<any[], false>;
164
163
  'no-typename-prefix': import("..").GraphQLESLintRule<any[], false>;
@@ -170,18 +169,17 @@ export declare const rules: {
170
169
  'require-deprecation-reason': import("..").GraphQLESLintRule<any[], false>;
171
170
  'require-description': import("..").GraphQLESLintRule<[{
172
171
  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
- };
172
+ } & {
173
+ ScalarTypeDefinition?: boolean;
174
+ ObjectTypeDefinition?: boolean;
175
+ FieldDefinition?: boolean;
176
+ InputValueDefinition?: boolean;
177
+ InterfaceTypeDefinition?: boolean;
178
+ UnionTypeDefinition?: boolean;
179
+ EnumTypeDefinition?: boolean;
180
+ EnumValueDefinition?: boolean;
181
+ InputObjectTypeDefinition?: boolean;
182
+ DirectiveDefinition?: boolean;
185
183
  }], false>;
186
184
  'require-field-of-type-query-in-mutation-result': import("..").GraphQLESLintRule<any[], false>;
187
185
  'require-id-when-available': import("..").GraphQLESLintRule<[{