Skip to content

📎 Implement useImplicitBoolean #5095

@dyc3

Description

@dyc3

Description

Add useImplicitBoolean, a rule that enforces using implicit booleans in JSX over explicit boolean props.

Valid

<Foo bar />
<Foo bar={false} />

Invalid

<Foo bar={true} />

Requested here: #3 (comment)

Source: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md

Note that we already have noImplicitBoolean, the opposite of this rule. Would it be worth it to combine them into one rule? The best time to do so would be before 2.0.

Metadata

Metadata

Labels

S-Needs discussionStatus: needs a discussion to understand criteria

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions