0

I´m using intellij 14 and I just active the JSLint and JSHint, and it´s pretty useful, burt I dont like the code style of declare variables like var a,b,c instead var a; var b; and var c; So now all my code is full of warnings saying 'combine this with the previous var statement'. Can anybody tell me where can I suppress this warning?. I cannot find it.

Regards.

paul
  • 12,873
  • 23
  • 91
  • 153

1 Answers1

1

Set to Tolerate: many var statements in your JSLint settings:

enter image description here

CodingIntrigue
  • 75,930
  • 30
  • 170
  • 176
  • Thanks!, I thought that option was doing something else. And my last question regarding JDLint. How can I get rid of the warning 'function' was used before it was defined. Regards. – paul Jan 19 '15 at 13:14
  • You can define the function name using the global keyword: http://stackoverflow.com/questions/9621162/jslint-was-used-before-it-was-defined – CodingIntrigue Jan 19 '15 at 13:15
  • Yes I already have that for all the JQuery libraries, but I was expecting to get rid of the warnings without have to tell which functions. Let´s say I dont mind the order of definition on my js, so if I have var b=function(){ a()}; function a(){} I dont want to take care to define first a before var b – paul Jan 19 '15 at 13:20