Rule: no-empty
Disallows empty blocks.
Blocks with a comment inside are not considered empty.
Rationale
Empty blocks are often indicators of missing code.
Config
If allow-empty-catch
is specified, then catch blocks are allowed to be empty.
If allow-empty-functions
is specified, then function definitions are allowed to be empty.
Config examples
"no-empty": true
"no-empty": [true, "allow-empty-catch"]
"no-empty": [true, "allow-empty-functions"]
"no-empty": [true, "allow-empty-catch", "allow-empty-functions"]
Schema
{ "type": "array", "items": { "anyOf": [ { "type": "string", "enum": [ "allow-empty-catch" ] }, { "type": "string", "enum": [ "allow-empty-functions" ] } ] } }