Skip to content

per-rule max-warning or max-error #3059

Description

@dimitropoulos

Is your feature request related to a problem? Please describe.

Sometimes there are rules that you want to error for, but you might have one or two exceptions you can't change or fix (as they would break the API). It's unfortunate to have to globally turn a rule off because of one exception.

Describe the solution you'd like

It would be great to have a pre-rule warn/error limit. A way to say "if this rule is set to error, please continue to do so, but today we have 4 of them so don't allow more than 4"

Describe alternatives you've considered

  • pre-instance warnings (like an eslint-disable-line sorta thing) are not viable for OpenAPI.json files (which cannot have comments)
  • downgrading to warn instead means there would be no code change to alert reviewers whenever it goes up in the future

Additional context

There are projects like eslint-seatbelt and eslint-nibble that have features like this, and it'd be a good match for redocly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions