As part of a really large React codebase, we have added a lot of prop type check over the years.
They output a lot of errors when prop type validations fail:
I noticed that in the developer console, I can override the default settings to hide all the errors like below:
and if I do that all the normal errors and these type invalidation errors get hidden.
Is there a way I can hide only the prop-type check errors (by classifying them as some other output type) and keep getting the usual JS errors - to reduce the noise I'm getting and this also causes a lot of vertical scroll which is hard to keep up with and causes the usual console messages to lose sight of.
you can use filter field provided in developer console
you can filter out error based on their content using regex, simply write -/Failed\s+prop\s+type/
in the filter field.
we write regex in between //
, we append it with -
to indicate that don't show anything that matches the regex, \s+
is used to represent whitespace in regex.