ng-easy-image-crop
ng-easy-image-crop copied to clipboard
global namespace tainted
use jshint/jslint to locate the culprits, a general cleanup would be nice
I've ran the directive code through JSHint, and will continue to do so. However, I'm not quite sure on the scope of what you meant by "global namespace tainted", so if this isn't exactly what you meant, I'm leaving this issue open for a bit so you can clarify. Thanks.
Accidentally Closed..
Most of the jshint errors are gone (I prefer jslint though), I referred to missing var keywords which is a deadly sin. Minor problems I still can see:
- mixed spaces and tabs
- strict equality (=== vs ==)
- unneccesary grouping operators
These are my jshintrc settings, just for comparison: "node": true, "esnext": true, "bitwise": true, "curly": true, "eqeqeq": true, "forin": true, "maxerr": 500, "noarg": true, "nonbsp": true, "nonew": true, "singleGroups": true, "undef": true, "browser": true, "jquery": true,
You might also want to look into jscs and a jscs based code formatter (Sublime has one).
This line seems to be fishy too:
if (rectangleLeft || rectangleRight || rectangleRight || rectangleHeight) {