Skip to content

Commit 30ad699

Browse files
committed
Fix: Unescape idenfitifers typescript may prepend underscore (fixes eslint#145)
Typescript will prepend an underscore to an identifier when it starts with two leading underscores. This causes rules to break in eslint becuase identifiers do not match those in the source code.
1 parent 0b343ab commit 30ad699

File tree

3 files changed

+489
-1
lines changed

3 files changed

+489
-1
lines changed

lib/ast-converter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ module.exports = function(ast, extra) {
735735
case SyntaxKind.Identifier:
736736
assign(result, {
737737
type: "Identifier",
738-
name: node.text
738+
name: ts.unescapeIdentifier(node.text)
739739
});
740740
break;
741741

0 commit comments

Comments
 (0)