dcposch / scramble

Secure email for everyone
http://dcposch.github.io/scramble/
226 stars 32 forks source link

Use JSLint #69

Open dcposch opened 10 years ago

dcposch commented 10 years ago

The Javascript could be cleaner in a few ways.

I'm sure we want to go in order starting with simple improvements. I'm not sure whether we want to do the last two at all. There's a tradeoff: is the extra complexity and indirection worth it?

dcposch commented 10 years ago

At least passes jshint now, except a set of spurious warnings because jshint doesn't know about sessionStorage

feross commented 10 years ago

You can add /*jshint browser:true */ or something along those lines to the top of your file to make a bunch of these warnings about missing types go away.

If that doesn't do it, you can manually whitelist it by adding /* global MY_GLOBAL */ to the top of the file. Or, alternatively, create a .jshintrc file and stick all this config stuff in there. For some reason, in a .jshintrc file, "global" is named "predef". See: http://www.jshint.com/docs/

jtremback commented 10 years ago

Yea, I got into the JS a while ago. Kind of gave up, as it is very messy and procedural.

I normally don't use frameworks, but in the case of this app, I think that Angular would enforce some much needed discipline.