React props shorthand prettier

808 Views Asked by At

There is a react codebase, and I would like to prettify it with the following rule:

  • Complete the prop shorthands with a value. shorthand => shorthand={true}

Current:

<Table celled unstackable />

Expected:

<Table celled={true} unstackable={true} />
1

There are 1 best solutions below

1
On

This is an eslint rule

Just add this to your eslintrc rules to disable it;

react/jsx-boolean-value: off