An ESLint plugin providing switch-case-specific linting rules, including no-default-case, no-case-curly, and newline-between-switch-case. Current stable version is 4.0.0, released with support for ESLint ^9.8.0 or ^10.0.0 and Node.js ^20.19.0 || ^22.13.0 || >= 24. The plugin enforces stylistic and logic rules for switch statements, filling a niche not covered by ESLint core rules. It is maintained by lukeapage and is in active development.
npm install eslint-plugin-switch-caseVerified import paths — ran on the pinned version, not inferred.
Sets up ESLint with the switch-case plugin using recommended config and custom rule overrides.
Upgrade ESLint to ^9.8.0 || ^10.0.0 and Node to ^20.19.0 || ^22.13.0 || >= 24.
Use import statements or ensure your project is configured for ESM.
Use import { rules, configs } from 'eslint-plugin-switch-case' instead of importing default.Manually select rules instead of extending recommended.
Run 'npm install eslint-plugin-switch-case --save-dev' and add 'switch-case' to plugins.
Ensure plugins: ['switch-case'] is set in your ESLint config.
Switch to ESM or use dynamic import().
No dependency data recorded yet.