Skip to content

react/boolean-prop-naming rule only applies if PropType.bool is used #2602

Closed
@UltraTempest

Description

@UltraTempest

I have:

import PropTypes from 'prop-types';
...
// eslint-disable-next-line react/boolean-prop-naming
open: PropTypes.bool.isRequired,

But if I do

import { bool } from 'prop-types';
...
open: bool.isRequired,

instead then I don't need to ignore the rule & the rule is not applied.

The rule should be applied in the case of a named export of bool from prop-types.

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