ANTD plugin for ESLint
npm install eslint-plugin-antdCollection of eslint rules for ANT Design
=========================================




!Coverage Badge
form-item-has-single-child
--------------------------
Ensuring that Form.Item elements contain exactly one child
Form items are essentialy the wrappers for input controls, to connect them to the form's context, using the cloneElement under the hood. To make it happen, input control must be the only (and direct) child of form item, in all other cases form item just does not work, printing some warnings in run time. You may occsionally add an extra child element, for the UI purposes, and break your form.
Examples of incorrect code for this rule:
``JavaScript`
name="username"
rules={[{ required: true, message: 'Please input your username!' }]}
>
`JavaScript`
name="password"
rules={[{ required: true, message: 'Please input your password!' }]}
>
Examples of correct code for this rule:
`JavaScript``
name="username"
rules={[{ required: true, message: 'Please input your username!' }]}
>
This rule has no options.