eslint-plugin-no-empty-blocks
An ESLint rule for eliminating empty block statements. It is an extended version of the no-empty
rule that allows empty catch blocks.
Why Use It
ESLint has the built-in no-empty
rule that is aimed at eliminating empty block statements. It throws a warning at empty catch blocks such as this one:
try ; catche {}
But this technique can be useful for ignoring errors, and this plugin provides an option to allow it.
Usage
Add no-empty-blocks
to the plugins
section of your .eslintrc
:
Turn off the no-empty
rule: