Open laurent22 opened 5 years ago
Also creates invalid code like:
From:
const someFunc = debounce(arg => {...})
To:
const someFunc = debounce( => {...})
Should change to:
const someFunc = debounce(() => {...})
Also the super mysterious case of a used var being left alone, but needlessly having the comma afterward removed.
From:
const { x, y, width, height } = this.state;
const newX = parseInt((x / prevWindow.width) * winWidth);
To:
const { x y, width, height } = this.state;
const newX = parseInt((x / prevWindow.width) * winWidth);
Edit: Actually, this happens a lot... Doesn't seem to handle destructuring assignments whatsoever.
There are a lot more edge cases too... like at least 4 more issues. They all seem to be variations on what is perhaps the same underlying bug in the rule's logic though.
Tell us about your environment
It changes this:
to this: