Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 899 Bytes

wont-fix.md

File metadata and controls

52 lines (41 loc) · 899 Bytes

Wont fix

While crawling on random projects on Github. I have found several false positives/false negatives arising from code which I consider to be anti-patterns. I do not plan to support these features.

Alert boxes (false negative)

Before

const MyComponent = () => (
  <button onClick={alert('Some string')}>
)

After

const MyComponent = () => (
  <button onClick={alert('Some string')}>
)

Requiring inside JSX component (false positive)

Before

const MyComponent = (src) => (
  <img src={require(`../${src}`)}>
)

After

const MyComponent = (src) => (
  <img src={require(`${i18n.t(k._)}${src}`)}>
)

Redundant parenthesis (false positive)

Before

const MyComponent = () => (
  <div>({someLiteral})</div>
)

After

const MyComponent = () => (
  <div>{i18n.t(k._)}{someLiteral}{i18n.t(k._1)}</div>
)