eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

no-unnecessary-break

ESLint plugin / no-unnecessary-break

Disallows unnecessary “break”.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/no-unnecessary-break": "error"
  }
};

Examples of incorrect code

switch (x) {
  case 1:
    break;

  case 2:
    break;
}

Examples of correct code

switch (x) {
  case 1:
    break;

  case 2:
}