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 changing the "unused suppression comment" lint severity to "error" #6891

Open
niieani opened this Issue Sep 14, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@niieani

niieani commented Sep 14, 2018

Currently it is possible to change the severity of all lints except for the "unused suppression comment" lint. I guess that stems from the fact that suppression linting was developed prior to the concept of other lints and follows a different code-path.

It would be very useful to make it configurable, just as with other lints, e.g.:

[lints]
unused-suppression=error

The main reason for this is that we create test suites for Flow typings, and write code like:

// $FlowErrorExpected
const a : number = 'abc'

Where $FlowErrorExpected is configured to be a suppression comment.

It makes total sense to have the flow command fail here in case the suppression assertion is invalid.

An alternative would be to allow a separate suppression comment, used exactly for the purpose of testing errors, like $FlowErrorExpected.

@wchargin

This comment has been minimized.

Show comment
Hide comment
@wchargin

wchargin Sep 14, 2018

Contributor

+1; this would be nice. Perhaps you already know this, but in the mean
time you can use flow --max-warnings=0.

Contributor

wchargin commented Sep 14, 2018

+1; this would be nice. Perhaps you already know this, but in the mean
time you can use flow --max-warnings=0.

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