I'd like to enforce curly braces for switch-cases in JS, possibly with ESLint or Prettier. Do you know of any related config, or if not that, then any other linting or formatting tool?

I tried the ESLint rule `curly` set to `"all"`, but it didn't compain about my curly-less switch-cases.

There is a [switch-case ESLint plugin](https://www.npmjs.com/package/eslint-plugin-switch-case), but I haven't found such a rule in its doc, neither in its source code.

**Example**

Wrong:

```js
switch (foo) {
  case "bar":
    return 1;
  case "baz":
    return 2;
  default:
    return 0;
}

```

Correct:

```js
switch (foo) {
  case "bar": {
    return 1;
  }
  case "baz": {
    return 2;
  }
  default: {
    return 0;
  }
}

```