node-wot
node-wot copied to clipboard
chore: add `guard-for-in` eslint rule
(Not only) in the context of #1177, I noticed that some of the for loops use the for ... in
syntax instead of the for ... of
syntax. Apparently, the former style is discouraged and not recommended by eslint, for example (see https://eslint.org/docs/latest/rules/guard-for-in).
This PR replaces the code lines in question and enforces the new style by activating the guard-for-in
eslint rule.