noImplicitBoolean
このコンテンツはまだ日本語訳がありません。
Diagnostic Category: lint/style/noImplicitBoolean
Since: v1.0.0
Sources:
- Inspired from:
react/jsx-boolean-value
Disallow implicit true
values on JSX boolean attributes
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-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}·/>
│ +++++++