import-js/eslint-plugin-import

Support Flow Enums

开放

#2,073 创建于 2021年5月14日

 (8 条评论) (4 个反应) (0 位负责人)JavaScript (1,549 个派生)batch import
enhancementflowhelp wanted

仓库指标

星标
 (5,939 个星标)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

Babel added support for flow enums here: https://github.com/babel/babel/pull/10344

Currently trying to import an enum results in MyEnum not found in enum-module

They're currently experimental, but should be coming down the pipe. I think it would be pretty trivial to support these, basically add an EnumDeclaration everywhere there is currently a TSEnumDeclaration.

I tried working on a PR for this, but the problem is getting the tests running. EnumDeclaration was added in babel 7.7.0. I was trying to get @babel/eslint-parser going in all the flow-related tests while retaining babel-eslint in other tests, but I kept running into problems.

贡献者指南