Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of eslint-plugin-flowtype's case exhaustion in switch statements #1686

Closed
hawkrives opened this issue Sep 25, 2017 · 2 comments
Closed

Comments

@hawkrives
Copy link
Member

https://github.com/mkscrg/eslint-plugin-flowtype/blob/768e7910b68eea8dbc6129862d6e6fbc0ebe03c6/.README/rules/no-unused-expressions.md

Essentially, anywhere a switch statement has an enum of the allowed types, we should typecast the expression as (empty), which is a special flow type which assures us that there are no more cases to be had.

@hawkrives
Copy link
Member Author

hawkrives commented Oct 6, 2017

Also use gajus/eslint-plugin-flowtype#236 (no-mutable-array)

@hawkrives
Copy link
Member Author

Meh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant