@typescript-eslint/typescript-estree 8.52.1-alpha.5 → 8.52.1-alpha.7
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/dist/check-syntax-errors.js +10 -6
- package/package.json +5 -5
|
@@ -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
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
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.
|
|
3
|
+
"version": "8.52.1-alpha.7",
|
|
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.
|
|
56
|
-
"@typescript-eslint/tsconfig-utils": "8.52.1-alpha.
|
|
57
|
-
"@typescript-eslint/types": "8.52.1-alpha.
|
|
58
|
-
"@typescript-eslint/visitor-keys": "8.52.1-alpha.
|
|
55
|
+
"@typescript-eslint/project-service": "8.52.1-alpha.7",
|
|
56
|
+
"@typescript-eslint/tsconfig-utils": "8.52.1-alpha.7",
|
|
57
|
+
"@typescript-eslint/types": "8.52.1-alpha.7",
|
|
58
|
+
"@typescript-eslint/visitor-keys": "8.52.1-alpha.7",
|
|
59
59
|
"debug": "^4.4.3",
|
|
60
60
|
"minimatch": "^9.0.5",
|
|
61
61
|
"semver": "^7.7.3",
|