Skip to content

Commit

Permalink
Fix: Remove jsdoc node property from ts nodes (fixes eslint#164)
Browse files Browse the repository at this point in the history
JSDoc property is not found on parsed ESTree nodes and should be
removed when parsing typescript nodes.
  • Loading branch information
soda0289 committed Feb 26, 2017
1 parent f96b6e2 commit bbd2cd6
Show file tree
Hide file tree
Showing 3 changed files with 662 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ast-converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ module.exports = function(ast, extra) {
function deeplyCopy() {
result.type = "TS" + SyntaxKind[node.kind];
Object.keys(node).filter(function(key) {
return !(/^(?:kind|parent|pos|end|flags|modifierFlagsCache)$/.test(key));
return !(/^(?:kind|parent|pos|end|flags|modifierFlagsCache|jsDoc)$/.test(key));
}).forEach(function(key) {
if (key === "type") {
result.typeAnnotation = (node.type) ? convertTypeAnnotation(node.type) : null;
Expand Down
Loading

0 comments on commit bbd2cd6

Please sign in to comment.