跳转到内容

noImplicitBoolean

此内容尚不支持你的语言。

Diagnostic Category: lint/style/noImplicitBoolean

Since: v1.0.0

Sources:

Disallow implicit true values on JSX boolean attributes

<input disabled />
code-block.jsx:1:8 lint/style/noImplicitBoolean  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use explicit boolean values for boolean JSX props.

> 1 │ <input disabled />
^^^^^^^^
2 │

Safe fix: Add explicit true literal for this attribute

1 │ <input·disabled={true}·/>
+++++++
<input disabled={false} />
<input disabled={''} />
<input disabled={0} />
<input disabled={undefined} />
<input disabled='false' />