eslint-plugin-flowtype icon indicating copy to clipboard operation
eslint-plugin-flowtype copied to clipboard

feat: add support for enum type

Open maxclaus opened this issue 4 years ago • 1 comments
trafficstars

Add support for the enum type usage https://flow.org/en/docs/enums/.

Fixes https://github.com/gajus/eslint-plugin-flowtype/issues/502.

Something I found during the tests, if you use @babel/plugin-syntax-flow plugin, then the babel-plugin-transform-flow-enums plugin must be placed before @babel/plugin-syntax-flow, otherwise the parser won't recognize the enum type. But, I think you could even remove @babel/plugin-syntax-flow if you are using babel-plugin-transform-flow-enums.

maxclaus avatar Oct 29 '21 11:10 maxclaus

hey @gajus, when you have some time, could you please check this PR? thanks 🙇

maxclaus avatar Oct 30 '21 12:10 maxclaus

Closing this in favor of https://github.com/flow-typed/eslint-plugin-ft-flow which has implemented it already

maxclaus avatar Apr 12 '23 20:04 maxclaus