fisker Cheung

Results 1279 comments of fisker Cheung

My personal opinion, we should only report those cases that braces can be removed. No option `alway` and `never`.

Stop thinking about BREAKING/NON-BRAKING, just make it correct, it's never been something we care. https://github.com/sindresorhus/eslint-plugin-unicorn/issues/686#issuecomment-1320449464

I'm confused, I can't find anything forbid TLA in class member, [the spec](https://tc39.es/proposal-top-level-await/), [acorn PR](https://github.com/acornjs/acorn/commit/65a9137ac9501d27e41aa37a48e1eddc0c605cda), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#top_level_await). But Node.js/browsers/parsers all(except `@typescript-eslint/parser` which can't be trust) failed to pase `class A {foo...

Because when parsing class member, the parser enters a non-async function? Need more time to learn the spec.

//cc @fregante @JounQin https://github.com/fisker/eslint-plugin-unicorn/pull/282/files I run this on our codebase, feel losing readability, look good to you?

This ```js if (a) { return 1; } if (b) { return 2; } if (c) { return 3; } else { return 4; } ``` seems fine to fix...

Example this line https://github.com/fisker/eslint-plugin-unicorn/pull/282/files#diff-b6b472744fff513bca9c7577f37bc75b74371f8f7fab1621e4aae16ce15793dcL53, there are many other `if` above it.

If there are many descriptors, normally it's a loop, if there are not many descriptors, I don't think they make much difference. But I'm fine adding this rule, just don't...

If we decide to add this rule, we should also check [`Reflect.defineProperty`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty)