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

Add formfield-htmlfor-id rule #28

Merged
merged 3 commits into from
Nov 13, 2021
Merged

Conversation

taysea
Copy link
Collaborator

@taysea taysea commented Nov 12, 2021

What does this PR do?

Adds rule that checks that FormField has htmlFor that matches the id of its child input.

Where should the reviewer start?

lib/rules/formfield-htmlfor-id.js

Can you provide a link to an AST Explorer example that validates the rule works as expected?

https://astexplorer.net/#/gist/f47559f8d3bf9decaf79d8fd7b18bd19/79717f9256f92d27686c0d87e5e06ce666659b98

Any background context you want to provide?

What are the relevant issues?

Closes #10

Screenshots (if appropriate)

Screen Shot 2021-11-12 at 1 50 59 PM

Have docs been added/updated?

Yes.

Should this PR be mentioned in the release notes?

Yes. Added formfield-htmlfor-id.

Is this change backwards compatible or is it a breaking change?

Backwards compatible.

@ericsoderberghp ericsoderberghp merged commit a5d908d into master Nov 13, 2021
@ericsoderberghp ericsoderberghp deleted the formfield-htmlfor-id branch November 13, 2021 17:46
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.

Corresponding FormField htmlFor and input id
2 participants