champloo11 / ng-easy-image-crop

Angular Directive for Easy Server-Side Image Cropping. Handles both original image and scaled image dimensions.
18 stars 3 forks source link

global namespace tainted #2

Open szkrd opened 9 years ago

szkrd commented 9 years ago

use jshint/jslint to locate the culprits, a general cleanup would be nice

champloo11 commented 9 years ago

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.

champloo11 commented 9 years ago

Accidentally Closed..

szkrd commented 9 years ago

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:

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,

szkrd commented 9 years ago

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) {