You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Disallow `Array#reduce()` and `Array#reduceRight()`
2
+
3
+
`Array#reduce()` and `Array#reduceRight()` usually [result in hard-to-read code](https://twitter.com/jaffathecake/status/1213077702300852224). In almost every case, it can be replaced by `.map`, `.filter`, or a `for-of` loop. It's only somewhat useful in the rare case of summing up numbers.
4
+
5
+
Use `eslint-disable` comment if you really need to use it.
@@ -115,6 +116,7 @@ Configure it in `package.json`.
115
116
-[no-new-buffer](docs/rules/no-new-buffer.md) - Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. *(fixable)*
116
117
-[no-null](docs/rules/no-null.md) - Disallow the use of the `null` literal.
0 commit comments