jbenet / depviz

dependency visualizer for the web
https://jbenet.github.io/depviz
MIT License
49 stars 10 forks source link

*: Fix 'for ... in' guards #65

Closed wking closed 7 years ago

wking commented 7 years ago

I'd been adding the if (true) “guards” because I didn't understand the ESLint warning. After reading the docs, I see that the rule is intended to protect from iterating over keys defined in prototypes. This commit uses the recommended approach from here to ensure we only iterate over directly-defined keys.

wking commented 7 years ago

Also a tab-cleanup commit riding along. I can split that out into a separate PR if folks want, but it seemed easier to keep the silly-cleanup stuff collected in one PR.

wking commented 7 years ago

Merged my own PR (over a week without negative reviews).