import-js / import-js/eslint-plugin-import
Support Flow Enums
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing TSEnumDeclaration handling and the flow-related tests mentioned in the issue. Check the Babel 7.7.0 and @babel/eslint-parser setup, then verify that importing Flow enums works and the relevant tests pass without breaking other tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100