Skip to content

jsx-boolean-value: enhance configuration to handle false literals #3234

Closed
@alexmatson-da

Description

@alexmatson-da

The react/jsx-boolean-value rule appears to only work with boolean props that have been assigned true literals. However, I have a codebase that sometimes contains (as an example) <MyComponent someBooleanProp={false} ... />

Is it possible to add a configuration option for this rule to flag these instances as props that should be removed completely (maybe even with autofix)?

If not, is there perhaps another rule that can help me achieve this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions