4bdc4c5f403c1a5838015272baf97e275ad2440a angie Mon Feb 2 16:30:26 2015 -0800 Code review feedback from Brian C: 1. Making a temporary this.mutState that all handlers implicitly have access to via this is almost as bad as using a global variable. Instead, pass mutState as a function arg so it's very clear where it's coming from. Brian suggested going a step farther and returning mutState from every handler so that the handler functions could be _.compose'd, but I'll be stubborn and stick with explicit side effects and _.forEach. 2. Tighten up jshint warnings -- it is very lax by default. I should have done #2 first and then embarked on #1 as a separate commit, but after doing #1 I wanted jshint checks to help me find places I forgot to update so it's all mashed together, sorry. diff --git src/hg/js/jshintrc.json src/hg/js/jshintrc.json new file mode 100644 index 0000000..3d60991 --- /dev/null +++ src/hg/js/jshintrc.json @@ -0,0 +1,16 @@ +{ + "camelcase": true, + "curly": true, + "eqeqeq": true, + "freeze": true, + "funcscope": true, + "immed": true, + "indent": 4, + "latedef": "nofunc", + "maxlen": 120, + "notypeof": true, + "predef": ["_", "$", "Immutable", "React", + "alert", "console", "document", "window"], + "undef": true, + "unused": true +}