fisker Cheung

Results 1275 comments of fisker Cheung

> It seems complicated to reliably enforce this for `const` variables, which have to be initialized and are thus used in the same scope where they're declared: > > >...

Should also report array methods that also exists in `Iterator` ```js // ❌ iterator.toArray().every() // ✅ iterator.every() ``` ```js // ❌ iterator.toArray().find() // ✅ iterator.find() ``` Full list https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator ~__`map`...

I guess it should be safe to assume that objects with `.toArray()` method is an `Iterator`?

This rule is about `.toArray()`. Not `new Set(Array.from(iterable))`, since there is no way to know the argument of `Array.from()` is `Iterator`. > Array.from(iterable) is a more well-known alternative `.toArray()` should...

Since `Object.assign()` won't reduce indentation level, the option should not apply to it.

Do we need to mark it optional? Not sure since I don't know if the module provides functionality can use without Prettier.

We can ignore such case, there are limitations for substitution. Maybe https://github.com/prettier/prettier/pull/6794 can fix it.