React props shorthand prettier

773 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 answers

1
Anuja On

This is an eslint rule

Just add this to your eslintrc rules to disable it;

react/jsx-boolean-value: off