Skip to content

Rule label-has-for is deprecated #483

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

Closed
wants to merge 1 commit into from
Closed

Rule label-has-for is deprecated #483

wants to merge 1 commit into from

Conversation

spyl94
Copy link

@spyl94 spyl94 commented Sep 6, 2018

A deprecated rule should not be present in recommended or strict configurations.

A deprecated rule should not be present in recommended or strict configurations.
@@ -73,7 +73,6 @@ module.exports = {
],
},
],
'jsx-a11y/label-has-for': 'error',
'jsx-a11y/label-has-associated-control': 'error',
Copy link
Member

Choose a reason for hiding this comment

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

hmm, the addition of the associated control rule to these configs should have been semver-major

@ljharb
Copy link
Member

ljharb commented Sep 6, 2018

Either way, “deprecated” is a documentation thing to notify people; i don’t see much point in removing the rule from these configs now (as opposed to later, when the actual rule is removed)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 99.547% when pulling 3ec2b1c on spyl94:patch-1 into 71819a0 on evcohen:master.

@spyl94
Copy link
Author

spyl94 commented Sep 6, 2018

Changelog (https://github.com/evcohen/eslint-plugin-jsx-a11y/releases/tag/v6.1.0) explains that this rule has been replaced by label-has-associated-control which is already present.

Right now I need to disable it, but I agree this change should bump version or wait 7.0.

@FranklinYu
Copy link
Contributor

Shall we also document in https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md that label-has-associated-control is designed replacement of this rule? I didn't know this until I look into this pull request.

@beefancohen
Copy link
Contributor

Shall we also document in https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md that label-has-associated-control is designed replacement of this rule? I didn't know this until I look into this pull request.

Yes, we should! @FranklinYu feel free to post a PR

@jessebeach
Copy link
Collaborator

@spyl94, thank you for the PR. We'll go with the documentation notice in #493 at this time. We'll remove the config line as you proposed here in the next major release.

@jessebeach jessebeach closed this Dec 2, 2018
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.

6 participants