fisker Cheung
fisker Cheung
Let's postpone this. We can do it when we get enough rules to rename/deprecate. I'll keep this open.
It seems `Temporal.Now.instant().epochMilliseconds` is the correct replacement for `Date.now()`.
How about just forbidding the use of `Date`, but allowing `Date.now()` behind an option?
After excluding many possible boolean values, there still false positive, because we can't know the `||` left side value type https://github.com/fisker/eslint-plugin-unicorn/pull/296/files#diff-922f3a7977dfb855fdc9b3a7ab921bf1de948d8b27ac6e2c8286b089db47b899L255 https://github.com/fisker/eslint-plugin-unicorn/pull/296/files#diff-929e56747d8ebca03aa53d228a84d03e8d3ba3cf2c63adafaa9dc0eac82b471eR97 https://github.com/fisker/eslint-plugin-unicorn/pull/296/files#diff-1cfe9745542244677eac6e608d3b38f06600a40c3f092c1535e220114dabcfe3R137 https://github.com/fisker/eslint-plugin-unicorn/pull/296/files#diff-4f3314711d30c02b6d078f0a04c3fe5fd455eb17d68185c4a9f4b7a792d4a25eR40 https://github.com/fisker/eslint-plugin-unicorn/pull/296/files#diff-ffbf303eac24990fbfa25f4240a4e5f8c88f86e4cc15aa4d45207b323db554f3R36 https://github.com/fisker/eslint-plugin-unicorn/pull/296/files#diff-d40e13bf614e2b95c6ee4e14a2ea3d2aa286efec3da4f87dd39947a1b294ab63R29 https://github.com/fisker/eslint-plugin-unicorn/pull/296/files#diff-4057a0454b81be8653d171ac0c8bcd6b183f35d8c233dd81208827b387dd5a54R11
> Is this even safely possible without types? It's not safe, as you can see the changes, I was thinking maybe we can set this rule to `warn` by default,...
That's all I got in mind.
Sorry, I missed that. What the option name should be? `preferThis`? Also, note that replace `superClassName` with `super` has lots of limitation. ```js class A extends B { static foo()...
Due to limitations mentioned above, maybe we should config `this` and `super` separately.
Should only allow `ExpressionStatement`.
Let's forbid `Array#push()`( covers #1487), `Array#unshift()`, `Array#forEach()`(`unicorn/no-array-for-each` already covered this, maybe people still prefer this method, but should only use as an `ExpressionStatement`), and `Array#splice()` too?