'use strict';
function foo(x) {
switch (x) {
case 'a':
return 1;
case 'b':
return 2;
default:
return 'c';
}
}
foo(1);
Results in:
/home/willy/foo/switch.js
5:5 Expected indentation of 2 space characters but found 4. (indent)
6:7 Expected indentation of 4 space characters but found 6. (indent)
7:5 Expected indentation of 2 space characters but found 4. (indent)
8:7 Expected indentation of 4 space characters but found 6. (indent)
9:5 Expected indentation of 2 space characters but found 4. (indent)
10:7 Expected indentation of 4 space characters but found 6. (indent)
Whereas:
'use strict';
function foo(x) {
switch (x) {
case 'a':
return 1;
case 'b':
return 2;
default:
return 'c';
}
}
foo(1);
Passes the linter. Surely this can't be right? Seems to have changed from v4.
@malandrew @rtsao
Consider the program:
Results in:
Whereas:
Passes the linter. Surely this can't be right? Seems to have changed from v4.