Errors: Support a filter to control which errors are reported

Fixes #335
Filter out errors after the fact, like maxerrors.

The clarity seems worth the extra loop over the errors list. Plus the loop
would look nice with filter().
On Nov 8, 2014 8:09 AM, "Alex Yaroshevich" <notifications@github.com> wrote:

> In lib/string-checker.js:
>
> > @@ -92,7 +92,7 @@ StringChecker.prototype = {
> >              parseError = e;
> >          }
> >          var file = new JsFile(filename, str, tree);
> > -        var errors = new Errors(file, this._verbose);
> > +        var errors = new Errors(file, this._verbose, this._configuration.getErrorFilter());
>
> Yup. But how?
> https://github.com/mrjoelkemp/node-jscs/blob/error_filter/lib/string-checker.js#L107
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jscs-dev/node-jscs/pull/728/files#r20051600>.
>