@typescript-eslint/typescript-estree 6.2.1-alpha.3 → 6.2.1-alpha.30

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 (49) hide show
  1. package/dist/convert.d.ts.map +1 -1
  2. package/dist/convert.js +115 -141
  3. package/dist/convert.js.map +1 -1
  4. package/dist/node-utils.d.ts.map +1 -1
  5. package/dist/node-utils.js +8 -10
  6. package/dist/node-utils.js.map +1 -1
  7. package/dist/parseSettings/ExpiringCache.d.ts.map +1 -1
  8. package/dist/parseSettings/ExpiringCache.js +2 -4
  9. package/dist/parseSettings/ExpiringCache.js.map +1 -1
  10. package/dist/parseSettings/warnAboutTSVersion.js +1 -1
  11. package/package.json +4 -4
  12. package/_ts4.3/dist/ast-converter.d.ts +0 -9
  13. package/_ts4.3/dist/clear-caches.d.ts +0 -10
  14. package/_ts4.3/dist/convert-comments.d.ts +0 -11
  15. package/_ts4.3/dist/convert.d.ts +0 -142
  16. package/_ts4.3/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +0 -13
  17. package/_ts4.3/dist/create-program/createDefaultProgram.d.ts +0 -12
  18. package/_ts4.3/dist/create-program/createIsolatedProgram.d.ts +0 -9
  19. package/_ts4.3/dist/create-program/createProjectProgram.d.ts +0 -10
  20. package/_ts4.3/dist/create-program/createProjectService.d.ts +0 -4
  21. package/_ts4.3/dist/create-program/createSourceFile.d.ts +0 -7
  22. package/_ts4.3/dist/create-program/describeFilePath.d.ts +0 -2
  23. package/_ts4.3/dist/create-program/getScriptKind.d.ts +0 -5
  24. package/_ts4.3/dist/create-program/getWatchProgramsForProjects.d.ts +0 -15
  25. package/_ts4.3/dist/create-program/shared.d.ts +0 -32
  26. package/_ts4.3/dist/create-program/useProvidedPrograms.d.ts +0 -16
  27. package/_ts4.3/dist/createParserServices.d.ts +0 -5
  28. package/_ts4.3/dist/getModifiers.d.ts +0 -4
  29. package/_ts4.3/dist/index.d.ts +0 -13
  30. package/_ts4.3/dist/jsx/xhtml-entities.d.ts +0 -2
  31. package/_ts4.3/dist/node-utils.d.ts +0 -254
  32. package/_ts4.3/dist/parseSettings/ExpiringCache.d.ts +0 -17
  33. package/_ts4.3/dist/parseSettings/createParseSettings.d.ts +0 -7
  34. package/_ts4.3/dist/parseSettings/getProjectConfigFiles.d.ts +0 -12
  35. package/_ts4.3/dist/parseSettings/index.d.ts +0 -122
  36. package/_ts4.3/dist/parseSettings/inferSingleRun.d.ts +0 -15
  37. package/_ts4.3/dist/parseSettings/resolveProjectList.d.ts +0 -19
  38. package/_ts4.3/dist/parseSettings/warnAboutTSVersion.d.ts +0 -3
  39. package/_ts4.3/dist/parser-options.d.ts +0 -192
  40. package/_ts4.3/dist/parser.d.ts +0 -20
  41. package/_ts4.3/dist/semantic-or-syntactic-errors.d.ts +0 -13
  42. package/_ts4.3/dist/simple-traverse.d.ts +0 -14
  43. package/_ts4.3/dist/source-files.d.ts +0 -4
  44. package/_ts4.3/dist/ts-estree/estree-to-ts-node-types.d.ts +0 -178
  45. package/_ts4.3/dist/ts-estree/index.d.ts +0 -4
  46. package/_ts4.3/dist/ts-estree/ts-nodes.d.ts +0 -14
  47. package/_ts4.3/dist/use-at-your-own-risk.d.ts +0 -7
  48. package/_ts4.3/dist/useProgramFromProjectService.d.ts +0 -5
  49. package/_ts4.3/dist/version-check.d.ts +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA2B5C,OAAO,KAAK,EACV,aAAa,EACb,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAKt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@@ class Converter {
123
123
  exportKind: 'value',
124
124
  });
125
125
  }
126
- else {
127
- const isType = result.type === ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration ||
128
- result.type === ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration;
129
- const isDeclare = 'declare' in result && result.declare === true;
130
- return this.createNode(node, {
131
- type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
132
- // @ts-expect-error - TODO, narrow the types here
133
- declaration: result,
134
- specifiers: [],
135
- source: null,
136
- exportKind: isType || isDeclare ? 'type' : 'value',
137
- range: [exportKeyword.getStart(this.ast), result.range[1]],
138
- assertions: [],
139
- });
140
- }
126
+ const isType = result.type === ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration ||
127
+ result.type === ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration;
128
+ const isDeclare = 'declare' in result && result.declare === true;
129
+ return this.createNode(node, {
130
+ type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
131
+ // @ts-expect-error - TODO, narrow the types here
132
+ declaration: result,
133
+ specifiers: [],
134
+ source: null,
135
+ exportKind: isType || isDeclare ? 'type' : 'value',
136
+ range: [exportKeyword.getStart(this.ast), result.range[1]],
137
+ assertions: [],
138
+ });
141
139
  }
142
140
  return result;
143
141
  }
@@ -230,9 +228,7 @@ class Converter {
230
228
  child.directive = raw.slice(1, -1);
231
229
  return child; // child can be null, but it's filtered below
232
230
  }
233
- else {
234
- allowDirectives = false;
235
- }
231
+ allowDirectives = false;
236
232
  }
237
233
  return child; // child can be null, but it's filtered below
238
234
  })
@@ -780,12 +776,10 @@ class Converter {
780
776
  typeAnnotation: undefined,
781
777
  });
782
778
  }
783
- else {
784
- return this.createNode(node, {
785
- type: ts_estree_1.AST_NODE_TYPES.ArrayExpression,
786
- elements: node.elements.map(el => this.convertChild(el)),
787
- });
788
- }
779
+ return this.createNode(node, {
780
+ type: ts_estree_1.AST_NODE_TYPES.ArrayExpression,
781
+ elements: node.elements.map(el => this.convertChild(el)),
782
+ });
789
783
  }
790
784
  case SyntaxKind.ObjectLiteralExpression: {
791
785
  // TypeScript uses ObjectLiteralExpression in destructuring assignment, too
@@ -864,18 +858,16 @@ class Converter {
864
858
  kind: 'init',
865
859
  });
866
860
  }
867
- else {
868
- return this.createNode(node, {
869
- type: ts_estree_1.AST_NODE_TYPES.Property,
870
- computed: false,
871
- key: this.convertChild(node.name),
872
- kind: 'init',
873
- method: false,
874
- optional: false,
875
- shorthand: true,
876
- value: this.convertChild(node.name),
877
- });
878
- }
861
+ return this.createNode(node, {
862
+ type: ts_estree_1.AST_NODE_TYPES.Property,
863
+ computed: false,
864
+ key: this.convertChild(node.name),
865
+ kind: 'init',
866
+ method: false,
867
+ optional: false,
868
+ shorthand: true,
869
+ value: this.convertChild(node.name),
870
+ });
879
871
  }
880
872
  case SyntaxKind.ComputedPropertyName:
881
873
  return this.convertChild(node.expression);
@@ -1108,48 +1100,44 @@ class Converter {
1108
1100
  value: undefined,
1109
1101
  });
1110
1102
  }
1111
- else {
1112
- return arrayItem;
1113
- }
1103
+ return arrayItem;
1104
+ }
1105
+ let result;
1106
+ if (node.dotDotDotToken) {
1107
+ result = this.createNode(node, {
1108
+ type: ts_estree_1.AST_NODE_TYPES.RestElement,
1109
+ argument: this.convertChild(node.propertyName ?? node.name),
1110
+ decorators: [],
1111
+ optional: false,
1112
+ typeAnnotation: undefined,
1113
+ value: undefined,
1114
+ });
1114
1115
  }
1115
1116
  else {
1116
- let result;
1117
- if (node.dotDotDotToken) {
1118
- result = this.createNode(node, {
1119
- type: ts_estree_1.AST_NODE_TYPES.RestElement,
1120
- argument: this.convertChild(node.propertyName ?? node.name),
1121
- decorators: [],
1122
- optional: false,
1123
- typeAnnotation: undefined,
1124
- value: undefined,
1125
- });
1126
- }
1127
- else {
1128
- result = this.createNode(node, {
1129
- type: ts_estree_1.AST_NODE_TYPES.Property,
1130
- key: this.convertChild(node.propertyName ?? node.name),
1131
- value: this.convertChild(node.name),
1132
- computed: Boolean(node.propertyName &&
1133
- node.propertyName.kind === SyntaxKind.ComputedPropertyName),
1134
- method: false,
1135
- optional: false,
1136
- shorthand: !node.propertyName,
1137
- kind: 'init',
1138
- });
1139
- }
1140
- if (node.initializer) {
1141
- result.value = this.createNode(node, {
1142
- type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1143
- decorators: [],
1144
- left: this.convertChild(node.name),
1145
- optional: false,
1146
- range: [node.name.getStart(this.ast), node.initializer.end],
1147
- right: this.convertChild(node.initializer),
1148
- typeAnnotation: undefined,
1149
- });
1150
- }
1151
- return result;
1117
+ result = this.createNode(node, {
1118
+ type: ts_estree_1.AST_NODE_TYPES.Property,
1119
+ key: this.convertChild(node.propertyName ?? node.name),
1120
+ value: this.convertChild(node.name),
1121
+ computed: Boolean(node.propertyName &&
1122
+ node.propertyName.kind === SyntaxKind.ComputedPropertyName),
1123
+ method: false,
1124
+ optional: false,
1125
+ shorthand: !node.propertyName,
1126
+ kind: 'init',
1127
+ });
1152
1128
  }
1129
+ if (node.initializer) {
1130
+ result.value = this.createNode(node, {
1131
+ type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1132
+ decorators: [],
1133
+ left: this.convertChild(node.name),
1134
+ optional: false,
1135
+ range: [node.name.getStart(this.ast), node.initializer.end],
1136
+ right: this.convertChild(node.initializer),
1137
+ typeAnnotation: undefined,
1138
+ });
1139
+ }
1140
+ return result;
1153
1141
  }
1154
1142
  case SyntaxKind.ArrowFunction: {
1155
1143
  return this.createNode(node, {
@@ -1238,12 +1226,10 @@ class Converter {
1238
1226
  value: undefined,
1239
1227
  });
1240
1228
  }
1241
- else {
1242
- return this.createNode(node, {
1243
- type: ts_estree_1.AST_NODE_TYPES.SpreadElement,
1244
- argument: this.convertChild(node.expression),
1245
- });
1246
- }
1229
+ return this.createNode(node, {
1230
+ type: ts_estree_1.AST_NODE_TYPES.SpreadElement,
1231
+ argument: this.convertChild(node.expression),
1232
+ });
1247
1233
  }
1248
1234
  case SyntaxKind.Parameter: {
1249
1235
  let parameter;
@@ -1436,24 +1422,22 @@ class Converter {
1436
1422
  assertions: this.convertAssertClasue(node.assertClause),
1437
1423
  });
1438
1424
  }
1439
- else {
1440
- this.assertModuleSpecifier(node, false);
1441
- return this.createNode(node, {
1442
- type: ts_estree_1.AST_NODE_TYPES.ExportAllDeclaration,
1443
- source: this.convertChild(node.moduleSpecifier),
1444
- exportKind: node.isTypeOnly ? 'type' : 'value',
1445
- exported:
1446
- // note - for compat with 3.7.x, where node.exportClause is always undefined and
1447
- // SyntaxKind.NamespaceExport does not exist yet (i.e. is undefined), this
1448
- // cannot be shortened to an optional chain, or else you end up with
1449
- // undefined === undefined, and the true path will hard error at runtime
1450
- node.exportClause &&
1451
- node.exportClause.kind === SyntaxKind.NamespaceExport
1452
- ? this.convertChild(node.exportClause.name)
1453
- : null,
1454
- assertions: this.convertAssertClasue(node.assertClause),
1455
- });
1456
- }
1425
+ this.assertModuleSpecifier(node, false);
1426
+ return this.createNode(node, {
1427
+ type: ts_estree_1.AST_NODE_TYPES.ExportAllDeclaration,
1428
+ source: this.convertChild(node.moduleSpecifier),
1429
+ exportKind: node.isTypeOnly ? 'type' : 'value',
1430
+ exported:
1431
+ // note - for compat with 3.7.x, where node.exportClause is always undefined and
1432
+ // SyntaxKind.NamespaceExport does not exist yet (i.e. is undefined), this
1433
+ // cannot be shortened to an optional chain, or else you end up with
1434
+ // undefined === undefined, and the true path will hard error at runtime
1435
+ node.exportClause &&
1436
+ node.exportClause.kind === SyntaxKind.NamespaceExport
1437
+ ? this.convertChild(node.exportClause.name)
1438
+ : null,
1439
+ assertions: this.convertAssertClasue(node.assertClause),
1440
+ });
1457
1441
  }
1458
1442
  case SyntaxKind.ExportSpecifier:
1459
1443
  return this.createNode(node, {
@@ -1469,13 +1453,11 @@ class Converter {
1469
1453
  expression: this.convertChild(node.expression),
1470
1454
  });
1471
1455
  }
1472
- else {
1473
- return this.createNode(node, {
1474
- type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
1475
- declaration: this.convertChild(node.expression),
1476
- exportKind: 'value',
1477
- });
1478
- }
1456
+ return this.createNode(node, {
1457
+ type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
1458
+ declaration: this.convertChild(node.expression),
1459
+ exportKind: 'value',
1460
+ });
1479
1461
  // Unary Operations
1480
1462
  case SyntaxKind.PrefixUnaryExpression:
1481
1463
  case SyntaxKind.PostfixUnaryExpression: {
@@ -1491,14 +1473,12 @@ class Converter {
1491
1473
  argument: this.convertChild(node.operand),
1492
1474
  });
1493
1475
  }
1494
- else {
1495
- return this.createNode(node, {
1496
- type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
1497
- operator,
1498
- prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
1499
- argument: this.convertChild(node.operand),
1500
- });
1501
- }
1476
+ return this.createNode(node, {
1477
+ type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
1478
+ operator,
1479
+ prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
1480
+ argument: this.convertChild(node.operand),
1481
+ });
1502
1482
  }
1503
1483
  case SyntaxKind.DeleteExpression:
1504
1484
  return this.createNode(node, {
@@ -1546,25 +1526,23 @@ class Converter {
1546
1526
  result.expressions.push(this.convertChild(node.right));
1547
1527
  return result;
1548
1528
  }
1549
- else {
1550
- const expressionType = (0, node_utils_1.getBinaryExpressionType)(node.operatorToken);
1551
- if (this.allowPattern &&
1552
- expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression) {
1553
- return this.createNode(node, {
1554
- type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1555
- decorators: [],
1556
- left: this.convertPattern(node.left, node),
1557
- optional: false,
1558
- right: this.convertChild(node.right),
1559
- typeAnnotation: undefined,
1560
- });
1561
- }
1529
+ const expressionType = (0, node_utils_1.getBinaryExpressionType)(node.operatorToken);
1530
+ if (this.allowPattern &&
1531
+ expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression) {
1562
1532
  return this.createNode(node, {
1563
- ...expressionType,
1564
- left: this.converter(node.left, node, expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression),
1533
+ type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1534
+ decorators: [],
1535
+ left: this.convertPattern(node.left, node),
1536
+ optional: false,
1565
1537
  right: this.convertChild(node.right),
1538
+ typeAnnotation: undefined,
1566
1539
  });
1567
1540
  }
1541
+ return this.createNode(node, {
1542
+ ...expressionType,
1543
+ left: this.converter(node.left, node, expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression),
1544
+ right: this.convertChild(node.right),
1545
+ });
1568
1546
  }
1569
1547
  case SyntaxKind.PropertyAccessExpression: {
1570
1548
  const object = this.convertChild(node.expression);
@@ -1813,12 +1791,10 @@ class Converter {
1813
1791
  expression,
1814
1792
  });
1815
1793
  }
1816
- else {
1817
- return this.createNode(node, {
1818
- type: ts_estree_1.AST_NODE_TYPES.JSXExpressionContainer,
1819
- expression,
1820
- });
1821
- }
1794
+ return this.createNode(node, {
1795
+ type: ts_estree_1.AST_NODE_TYPES.JSXExpressionContainer,
1796
+ expression,
1797
+ });
1822
1798
  }
1823
1799
  case SyntaxKind.JsxAttribute: {
1824
1800
  return this.createNode(node, {
@@ -2252,12 +2228,10 @@ class Converter {
2252
2228
  type: ts_estree_1.AST_NODE_TYPES.TSNullKeyword,
2253
2229
  });
2254
2230
  }
2255
- else {
2256
- return this.createNode(node, {
2257
- type: ts_estree_1.AST_NODE_TYPES.TSLiteralType,
2258
- literal: this.convertChild(node.literal),
2259
- });
2260
- }
2231
+ return this.createNode(node, {
2232
+ type: ts_estree_1.AST_NODE_TYPES.TSLiteralType,
2233
+ literal: this.convertChild(node.literal),
2234
+ });
2261
2235
  }
2262
2236
  case SyntaxKind.TypeAssertionExpression: {
2263
2237
  return this.createNode(node, {