@typescript-eslint/typescript-estree 8.52.1-alpha.6 → 8.52.1-alpha.8

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.
@@ -316,12 +316,16 @@ function checkSyntaxError(tsNode, parent, allowPattern) {
316
316
  const interfaceHeritageClauses = node.heritageClauses ?? [];
317
317
  let seenExtendsClause = false;
318
318
  for (const heritageClause of interfaceHeritageClauses) {
319
- if (heritageClause.token !== SyntaxKind.ExtendsKeyword) {
320
- throw (0, node_utils_1.createError)(heritageClause,
321
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
322
- heritageClause.token === SyntaxKind.ImplementsKeyword
323
- ? "Interface declaration cannot have 'implements' clause."
324
- : 'Unexpected token.');
319
+ const { token, types } = heritageClause;
320
+ if (token === SyntaxKind.ImplementsKeyword) {
321
+ throw (0, node_utils_1.createError)(heritageClause, "Interface declaration cannot have 'implements' clause.");
322
+ }
323
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
324
+ if (token !== SyntaxKind.ExtendsKeyword) {
325
+ throw (0, node_utils_1.createError)(heritageClause, 'Unexpected token.');
326
+ }
327
+ if (types.length === 0) {
328
+ throw (0, node_utils_1.createError)(heritageClause, `'${ts.tokenToString(token)}' list cannot be empty.`);
325
329
  }
326
330
  if (seenExtendsClause) {
327
331
  throw (0, node_utils_1.createError)(heritageClause, "'extends' clause already seen.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/typescript-estree",
3
- "version": "8.52.1-alpha.6",
3
+ "version": "8.52.1-alpha.8",
4
4
  "description": "A parser that converts TypeScript source code into an ESTree compatible form",
5
5
  "files": [
6
6
  "dist",
@@ -52,10 +52,10 @@
52
52
  "typecheck": "yarn run -BT nx typecheck"
53
53
  },
54
54
  "dependencies": {
55
- "@typescript-eslint/project-service": "8.52.1-alpha.6",
56
- "@typescript-eslint/tsconfig-utils": "8.52.1-alpha.6",
57
- "@typescript-eslint/types": "8.52.1-alpha.6",
58
- "@typescript-eslint/visitor-keys": "8.52.1-alpha.6",
55
+ "@typescript-eslint/project-service": "8.52.1-alpha.8",
56
+ "@typescript-eslint/tsconfig-utils": "8.52.1-alpha.8",
57
+ "@typescript-eslint/types": "8.52.1-alpha.8",
58
+ "@typescript-eslint/visitor-keys": "8.52.1-alpha.8",
59
59
  "debug": "^4.4.3",
60
60
  "minimatch": "^9.0.5",
61
61
  "semver": "^7.7.3",