I have a Sublimelinter installed in Sublime Text 2 and it\'s great. However it doesn\'t like the following code:
if(condition){ var result = 1; }else{
It is not wrong. If you get that error, you defined result earlier in your code.
result
You can also simplify your condition to this so you don't have to use result:
process( condition ? 1 : 2 );