Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eslint/babel-eslint-parser/src/ast-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export function getVisitorKeys() {
if (!visitorKeys) {
// AST Types that are not presented in Babel AST
const newTypes = {
AccessorProperty: ["decorators", "typeAnnotation", "value", "key"],
ChainExpression: ESLINT_VISITOR_KEYS.ChainExpression,
ImportExpression: ESLINT_VISITOR_KEYS.ImportExpression,
Literal: ESLINT_VISITOR_KEYS.Literal,
Expand Down
7 changes: 7 additions & 0 deletions eslint/babel-eslint-parser/test/typescript-estree.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,4 +460,11 @@ describe("Babel should output the same AST as TypeScript-Estree", () => {
}
}
});

describe("templates", () => {
// This test needs typescript-estree, espree doesn't support AccessorProperty
it("template element ranges inside accessor property #18230", () => {
parseAndAssertSame("class T { accessor a = `x${y}z`; }");
});
});
});
Loading