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

Add rule to enforce error codes on flow suppressions #453

Open
christianvuerings opened this issue Aug 19, 2020 · 2 comments · May be fixed by #489
Open

Add rule to enforce error codes on flow suppressions #453

christianvuerings opened this issue Aug 19, 2020 · 2 comments · May be fixed by #489

Comments

@christianvuerings
Copy link

Flow version 0.121.0 allows for more specific error suppressions:
https://medium.com/flow-type/making-flow-error-suppressions-more-specific-280aa4e3c95c

It would be wonderful if we could have a rule which requires these specific error suppressions:

  • // $FlowFixMe would fail since it has no valid error code specified
  • // $FlowFixMe[incompatible-type] would pass since it does have a valid error code
@Brianzchen
Copy link
Contributor

Flow can enforce this with their configs, include_warnings=true option. Would this lint rule still be necessary? Although flow doesn't highlight warnings in vscode which is a bit annoying.

Thoughts @christianvuerings ?

@christianvuerings
Copy link
Author

@Brianzchen We already have include_warnings=true in our config but it would still be great to have the error code enforcement as an ESLint rule as well since:

  • We can set it as warning or error in ESLint
  • ESLint violations do show up in VSCode

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

Successfully merging a pull request may close this issue.

3 participants