node/lib/internal/cluster
Antoine du Hamel d7e2318e74
tools: add ESLint rule no-array-destructuring
Iterating over arrays should be avoided because it relies on
user-mutable global methods (`Array.prototype[Symbol.iterator]`
and `%ArrayIteratorPrototype%.next`), we should instead use
other alternatives. This commit adds a rule that disallow
array destructuring syntax in favor of object destructuring syntax.
Note that you can ignore this rule if you are using
the array destructuring syntax over a safe iterable, or
actually want to iterate over a user-provided object.

PR-URL: https://github.com/nodejs/node/pull/36818
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-09-01 23:24:52 +02:00
..
child.js cluster: refactor to use more primordials 2020-12-15 20:15:19 +00:00
master.js cluster: refactor to use more primordials 2020-12-15 20:15:19 +00:00
round_robin_handle.js tools: add ESLint rule no-array-destructuring 2021-09-01 23:24:52 +02:00
shared_handle.js cluster: refactor to use more primordials 2020-12-15 20:15:19 +00:00
utils.js cluster: refactor to use more primordials 2020-12-15 20:15:19 +00:00
worker.js cluster: refactor to use more primordials 2020-12-15 20:15:19 +00:00