Skip to content
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(checks/label-content-name-mismatch): deprecate occuranceThreshold option in favor of occurrenceThreshold to fix typo #3782

Merged
merged 7 commits into from
Nov 30, 2022

Conversation

nolandanley
Copy link
Contributor

Fixes typos of the word "occurrence" throughout axe-core.

@nolandanley nolandanley requested a review from a team as a code owner November 15, 2022 01:51
@CLAassistant
Copy link

CLAassistant commented Nov 15, 2022

CLA assistant check
All committers have signed the CLA.

@@ -104,11 +104,11 @@ function shouldIgnoreHidden(virtualNode, context) {
* @return {Boolean}
*/
function shouldIgnoreIconLigature(virtualNode, context) {
const { ignoreIconLigature, pixelThreshold, occuranceThreshold } = context;
const { ignoreIconLigature, pixelThreshold, occurrenceThreshold } = context;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should avoid a break in the API.

Suggested change
const { ignoreIconLigature, pixelThreshold, occurrenceThreshold } = context;
const { ignoreIconLigature, pixelThreshold } = context;
const occurrenceThreshold = context.occurrenceThreshold ?? context.occurenceThreshold

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I think you mean "occuranceThreshold" since that was the only version of the typo used in code. "Occurence" was only used in a comment. Added this modified fix in 22d9b95a1d851fae3c850f0a5f125a4ba8bf0438.

Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looking good so far, just need to update the name in one more place. Also, since we're going to deprecate the old name we'll need to update the pr title to match conventional commits. We deprecate things as a feat and want to make sure the title says which thing is deprecated, and either the pr title or body should say what to use instead.

lib/checks/label/label-content-name-mismatch-evaluate.js Outdated Show resolved Hide resolved
@nolandanley nolandanley changed the title Typo fixes: "occurrence" feat: deprecate occuranceThreshold in favor of occurrenceThreshold Nov 25, 2022
@nolandanley nolandanley changed the title feat: deprecate occuranceThreshold in favor of occurrenceThreshold feat: deprecate occuranceThreshold in favor of occurrenceThreshold to fix typo Nov 25, 2022
@nolandanley nolandanley requested review from straker and WilcoFiers and removed request for WilcoFiers and straker November 25, 2022 04:08
@straker straker dismissed stale reviews from WilcoFiers and themself November 29, 2022 16:35

Resolved

Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great. Looks like the tests are failing due to missing optional chaining. Tests should pass once it's added.

lib/checks/label/label-content-name-mismatch-evaluate.js Outdated Show resolved Hide resolved
@straker
Copy link
Contributor

straker commented Nov 30, 2022

Reviewed for security

@straker straker changed the title feat: deprecate occuranceThreshold in favor of occurrenceThreshold to fix typo feat(label-content-name-mismatch-evaluate): deprecate occuranceThreshold in favor of occurrenceThreshold to fix typo Nov 30, 2022
@straker straker changed the title feat(label-content-name-mismatch-evaluate): deprecate occuranceThreshold in favor of occurrenceThreshold to fix typo feat(checks/label-content-name-mismatch): deprecate occuranceThreshold option in favor of occurrenceThreshold to fix typo Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants