Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Revert 584 #697

Merged
merged 4 commits into from Sep 27, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions lib/babylon-to-espree/toAST.js
Expand Up @@ -72,15 +72,6 @@ var astTransformVisitor = {
delete node.bound;
}

if (path.isTypeAlias()) {
node.type = "FunctionDeclaration";
node.generator = false;
node.async = false;
node.expression = false;
node.params = [];
node.body = node.right;
}

// flow: prevent "no-undef"
// for "Component" in: "let x: React.Component"
if (path.isQualifiedTypeIdentifier()) {
Expand Down
12 changes: 0 additions & 12 deletions test/non-regression.js
Expand Up @@ -1091,18 +1091,6 @@ describe("verify", () => {
{ "no-unused-vars": 1, "no-undef": 1 }
);
});

it("cyclic type dependencies should not error #485", () => {
verifyAndAssertMessages(
unpad(`
type Node<T> = { head: T, tail: Node<T> };
type A = B[];
type B = number;
`),
{ "no-use-before-define": 0 },
[]
);
});
});

it("class usage", () => {
Expand Down