Skip to content

Extend "jsx-boolean-value" to support optional "ignore" list #1249

@mehdivk

Description

@mehdivk

It would be great if we could configure jsx-boolean-value to ignore a list of props.

Example

{
  'react/jsx-boolean-value': ['error', 'never', { ignore: ['value']}]
}

This allows the following expression to be valid

<Toggle value={true} />

And if you wonder why I'm not using a prop like toggled instead of value, it's because we want to have a set of components that support the same prop.

I'm more than happy to support the idea with a PR.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions