Axetroy
Axetroy
Are there some exceptions, such as ```js new Date().getTime() new Date().toISOString() new Intl.ListFormat('en-US', {type: 'disjunction'}).format(words) ``` And I don't think they are unreadable.
@fisker Could you please update the examples above? I believe this rule remains relevant and meaningful. eg. The following code is awful ```js const Bar = new (Foo().Bar); ```
考虑到平滑过渡,升级至 rspack 更可靠 #15415
> Maybe we should only report when there is a number, since strings, `Date`s can also be compared. Make sense. > Ensure that everything, be it an Identifier, Literal, or...
> But I think we should only need to determine whether one of the left or right is a number > We only need to check if one of the...
> Why you need ESM version of this package? I'm going to use `tapable` in an environment that is not compatible with `cjs`, And, `ESM` is the future
> ```js > array.toReversed().find(logic); > array.toReversed().findIndex(logic); > array.toReversed().indexOf(logic); > array.toReversed().reduce(logic); > ``` Before node 18.x is deprecated, the current solution is more suitable https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2428#issuecomment-2298284336
Use `-1` to make the style be kept consistent Otherwise, someone would write code like this `index >= 0` `index > -1` `index < 0` `index
> If that can be done safely - including handling cases like `{ foo }`, `{ foo: function () {} }`, etc - that'd be a great enhancement. @ljharb Yes,...
There will be many false positives in the future. eg. ```js target.ondrag = 1 target.ondrag = {} target.ondrag = [] target.ondrag = true : 1 : 2 target.ondrag = void...