Open davisshaver opened 2 years ago
See convo here: https://github.com/holic/web3-scaffold/pull/26#discussion_r906902085
It doesn't look like there's an existing eslint rule for this, but there's some code here which we may be able to incorporate as a custom rule: https://github.com/jsx-eslint/eslint-plugin-react/pull/2888
For more on why we want to avoid this pattern, see here: https://kentcdodds.com/blog/use-ternaries-rather-than-and-and-in-jsx
Oh man I always wondered why ternary was preferred to &&. Nice one for wtfjs
Got an old coworker to send me the lint rule/fix + tests! Will see about publishing a plugin that we can pull in here.
See convo here: https://github.com/holic/web3-scaffold/pull/26#discussion_r906902085
It doesn't look like there's an existing eslint rule for this, but there's some code here which we may be able to incorporate as a custom rule: https://github.com/jsx-eslint/eslint-plugin-react/pull/2888
For more on why we want to avoid this pattern, see here: https://kentcdodds.com/blog/use-ternaries-rather-than-and-and-in-jsx