Skip to content

Provide a suppression option (to mute noisy 3rd-party node_modules) #3208

@mosesoak

Description

@mosesoak

Opening a new thread following the discussion at #869

There are certain cases where 3rd-party modules generate Flow errors, for example when a React Native library has baked their types and uses an outdated version of Flow. The reality is that although it's cyclical, there will probably always be cases where external modules bring their own errors.

Developers need a way to retain all of Flow's functionality but not be strapped with errors that fall outside their direct responsibility. The clearest path to doing this, suggested in the issue linked above, is to provide a simple suppression mechanism.

Here's a proposal for a way to easily limit the noise while leaving type-checking enabled, but get a clear indication of which modules contain breakage:

  1. Leave [ignore] as is, continue to type-check everything else.

  2. Add a suppress block to the config, maybe [quiet]. Folks can either list specific problem modules here, or node_modules/* depending on the current noise level.

  3. Make [include] override quiet. So even if you use * in quiet you can whitelist the ones you contribute to or trust to stay current.

  4. And finally, a concise but informative status summary in the output like,

    No errors.

    34 errors hidden by [quiet]: @exponent/ex-navigation (31), other (3).

This would provide a simple 'mute' option for the masses, that still provides enough information to prompt developers to solve the problems in the wider community over time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions