JSLint and "You are expected to see the expression and see the block instead." error

I chose the habit of wrapping all of my arguments in curly braces from C programming because of this , but JSLint is giving up. At this point, it ceases to be checked.

My question is: is this such a bad practice in JS? I don’t need to worry about the area problem because JS has a functional area (I understand how it will be so, I just want it to not be “consistent” for this reason)?

(I know that different languages ​​require different practices, but I try to be as compatible in different languages ​​as possible to protect my sanity.)

+1
source share
1 answer

Good question.

, JSLint , , switch/case:

http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf

https://developer.mozilla.org/en/JavaScript/Reference/Statements/switch

JavaScript , JSLint , JavaScript. ( " ", !)

, - , -. , ?

, JavaScript. , :

var x = 0;
switch(x){
    case 0:
        var y = 1;
        alert(y);
}

JSFiddle: http://jsfiddle.net/LKWwB/

, , , . : -)

+4

All Articles