-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: add per-rule granular error suppression #1826
Conversation
Agreed! Thanks for the contribution. Can you add an example for suppressing validation failures to the README? |
Updated the readme, and while I was at it realised that I should probably still respect Suppression Ignore Conditions when suppressing validation failures, so slightly refactored to ensure that occurs and added some tests to that effect. |
interface ExpectMessageConditions { | ||
readonly containing?: string[]; | ||
readonly notContaining?: string[]; | ||
readonly length?: number; | ||
} | ||
export function expectMessages( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Fixes #1818
This does slightly change some behaviours, specifically by suppressing errors for suppressed rules. I'm torn as to whether this is a sufficiently large behavioural change to cause an issue, though as a rule I feel it is a better behaviour and cant think of a scenario where someone would have been relying on a suppressed rule throwing an error.