jshint/jshint — Issue #391: Switch case error
Author: Mottie
Created: 2011-12-21 05:50:44+00:00
State: open

When I check the following code in JSLint, I don't get an error.

```javascript
function check(){
"use strict";
var a = 1, b = 1;
switch (a){
case 1:
if (b === 1) {
// do something
return false;
} else {
// do something else
return true;
}
case 2:
// do something
break;
}
}
```

But in JSHint, I get this error:

> Line 12:
> Expected a 'break' statement before 'case'.

Just thought I'd let you know :)