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

Allow suppressing certain warnings #572

Closed
ghengeveld opened this issue Jun 26, 2015 · 9 comments
Closed

Allow suppressing certain warnings #572

ghengeveld opened this issue Jun 26, 2015 · 9 comments

Comments

@ghengeveld
Copy link

While introducing flow in an existing project, it would be nice to be able to disable or suppress certain checks, much like linters allow you to configure which things to complain about and which to ignore.

@samwgoldman
Copy link
Member

Can you give an example? There are at least two mechanisms for this: any and suppress_comment, which might suit your needs, but it's hard to say without more details.

@ghengeveld
Copy link
Author

Specifically the 'unreachable code' warning, but I imagine there's others which are more of a linting error than a type error.

@bsr203
Copy link

bsr203 commented Jul 7, 2015

I guess this addresses part of the question . it may be line by line though, not error type.

@samwgoldman
Copy link
Member

Neither any nor suppress_comment (the solution from #523) would work for this error, I believe. However, I believe @davidmason may be addressing this error in particular (see #125).

@Eschon
Copy link

Eschon commented Aug 19, 2015

👍 for this feature
I have a class that sets a lot of properties in the constructor. Every time I use them I get a property not found error found in ... error. Those errors are about 90% of the output that I get from flow, it would be nice to be able to suppress them as I don't plan to fix them.

@bjouhier
Copy link

👍 I'm getting lots of get/set properties not yet supported errors because of ES6 classes.

I don't want to annotate my code with a special comment because this error will (hopefully) go away by itself in the future. Is there a way to suppress a specific error globally though .flowconfig? This would be especially useful for NIYs.

For now I'm handling it with flow --color always --one-line | grep -v "not yet supported" but it's not ideal (for example I'm getting an incorrect error count at the end).

@jamiter
Copy link

jamiter commented Mar 17, 2016

I'm getting property 'thing' Property not found in Classhere. And that's correct because ES6 doesn't have class properties yet. So a way to silence that error would be nice. Now I can't use ES6 classes with flow...

I'm trying to get flow working with Meteor and Meteor doesn't support stage 0 features. Is there documentation on which ES features Flow supports/demands?

Edit: I found this issue showing the supported ES6 features: #560

@bobmoff
Copy link

bobmoff commented May 9, 2017

👍 to opt out of specific type of warnings like Property not found in object literal which is IMHO a very useful feature of the language

@SamChou19815
Copy link
Contributor

Closing since we are unlikely to support features like this.

@SamChou19815 SamChou19815 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2023
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

9 participants