fisker Cheung

Results 1279 comments of fisker Cheung

I'm really sorry. Super busy recently, I'll review ASAP.

Can you fix the failing tests?

And let's try to statically analyze the AST too, not only literals. ## Fail ```js new Set([-1, -1]); ``` ```js const foo = 2; new Set([foo, 2]); ``` ```js new...

I remember we have a rule proposal to prevent unnecessary negated condition, but I forget what's in that proposal and I can't find it.

Not this one, I'll search issues again.

This #856. Kind of related, but this is more complicated.

Adding this rule will also benefit `prefer-switch` rule, currently we inserted `{}` for almost all cases. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/ab78c0ddac401abbe122373de0a7c1ebb990b144/rules/prefer-switch.js#L123

Let's implement this rule with `always` and `avoid` option?