The solution might be quite easy.
Your backend code is writing a string into JavaScript, right? So instead of this:
if( ( 'SIVA' ) === 'SIVA' ) {
result_int = 1000;
return;
}
Which on the backend looks like this:
if( ( '<%key_code%>' ) === 'SIVA' ) {
result_int = 1000;
return;
}
Do this on the backend template:
var key_code = '<%key_code%>';
if( key_code === 'SIVA' ) {
result_int = 1000;
return;
}
Which will be filled out on the client as such:
var key_code = 'SIVA';
if( key_code === 'SIVA' ) {
result_int = 1000;
return;
}
Both the template and the code delivered to the client should pass JSLint.