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

Update Babel to ^7.7.0 and enable Flow enums parsing #812

Merged
merged 4 commits into from Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions lib/analyze-scope.js
Expand Up @@ -149,6 +149,10 @@ class Referencer extends OriginalReferencer {
}
}

EnumDeclaration(node) {
this._createScopeVariable(node, node.id);
}

TypeAlias(node) {
this._createScopeVariable(node, node.id);

Expand Down
13 changes: 13 additions & 0 deletions test/non-regression.js
Expand Up @@ -229,6 +229,19 @@ describe("verify", () => {
);
});

it("enum declaration", () => {
verifyAndAssertMessages(
`
enum E {
A,
B,
}
E.A;
`,
{ "no-unused-vars": 1, "no-undef": 1 }
gkz marked this conversation as resolved.
Show resolved Hide resolved
);
});

it("type parameter bounds (classes)", () => {
verifyAndAssertMessages(
`
Expand Down