eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

switch-case-spacing

ESLint plugin / switch-case-spacing

Ensures consistent empty lines between switch case statements.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/switch-case-spacing": "error"
  }
};

Examples of incorrect code

switch (x) {
  case 1:

  case 2:
    break;
  case 3:
}

Examples of correct code

switch (x) {
  case 1:
  case 2:
    break;

  case 3:
}