-
Notifications
You must be signed in to change notification settings - Fork 791
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(configure): add axeVersion property that checks compatibility of axe.version #1793
Conversation
I think we should also update the TypeScript definition. |
@WilcoFiers did you have any particular reason why you wanted the name of the prop to be |
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.
Please hold until we've got an opinion from @downzer0.
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.
Couple of small points left.
@@ -8,6 +8,32 @@ function configureChecksRulesAndBranding(spec) { | |||
throw new Error('No audit configured'); | |||
} | |||
|
|||
if (spec.axeVersion) { |
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.
I should have caught this one earlier. But the ticket asks for adding both ver
and axeVersion
, where axeVersion
is prioritised over ver
if both are set. The intent is to have a fallback so that this can work for older custom rules as well.
(major === axeMajor && | ||
minor === axeMinor && | ||
patch === axePatch && | ||
((canary && axeCanary) || (canary && !axeCanary))) |
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.
I'm thinking if the canary version is the same, it also shouldn't throw.
Closes issue: #1780
Reviewer checks
Required fields, to be filled out by PR reviewer(s)