Actually, Emacs indents this JavaScript code like this:

```

switch (foo) {

case bar:

    ....

}

```


In `js.el` : `js--treesit-indent-rules`, the line

`       ((parent-is ,switch-case) parent-bol 0)`

should be

`       ((node-is ,switch-case) parent-bol js-switch-indent-offset)`


There is also a lot of mixed tab/space indent in this file.