ng-easy-image-crop icon indicating copy to clipboard operation
ng-easy-image-crop copied to clipboard

global namespace tainted

Open szkrd opened this issue 10 years ago • 4 comments

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

szkrd avatar Jul 02 '15 14:07 szkrd

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 avatar Jul 03 '15 03:07 champloo11

Accidentally Closed..

champloo11 avatar Jul 03 '15 03:07 champloo11

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,

szkrd avatar Jul 03 '15 07:07 szkrd

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

szkrd avatar Jul 03 '15 07:07 szkrd