-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
eslint rule 중 하나인 jsx-a11y/control-has-associated-label이 정상정으로 동작하지 않는 것을 확인하였습니다. label element에 htmlFor를 추가하고 input element에 id를 추가하였음에도 warning이 사라지지 않습니다.

문제: airbnb config에서 두 조건을 모두 만족시키지 않으면 error로 간주합니다.
https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/rules/react-a11y.js
해결 방법: 두 조건을 모두 만족시킵니다.
- https://stackoverflow.com/questions/57616720/react-jsx-a11y-eslint-throws-unexpected-errors-for-control-label?noredirect=1&lq=1
- Consider adding
jsx-a11y/control-has-associated-labelwhen it becomes more stable manovotny/eslint-config-get-off-my-lawn#109 - My
<label>hashtmlFormatching an input'sid, butjsx-a11y/label-has-associated-controlstill warns? jsx-eslint/eslint-plugin-jsx-a11y#718 (comment)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working