Repository: eslint/eslint
File: tests/lib/rules/no-empty.js (JavaScript)

Code before:
                suggestions: [{
                    messageId: "suggestComment",
                    data: { type: "block" },
                    output: "while (foo) { /* empty */ }"
                }]
            }]
        },
        {
            code: "for (;foo;) {}",
            errors: [{
                messageId: "unexpected",
                data: { type: "block" },
                type: "BlockStatement",
                suggestions: [{
                    messageId: "suggestComment",
                    data: { type: "block" },
                    output: "for (;foo;) { /* empty */ }"
                }]
            }]
        },
        {
            code: "switch(foo) {}",
            errors: [{
                messageId: "unexpected",
                data: { type: "switch" },
                type: "SwitchStatement"
            }]
        },
        {
            code: "switch (foo) { /* empty */ }",
            errors: [{
                messageId: "unexpected",
                data: { type: "switch" },
                type: "SwitchStatement",
                suggestions: null
            }]
        },
        {
            code: "try {} catch (ex) {}",
            options: [{ allowEmptyCatch: true }],
            errors: [{
                messageId: "unexpected",
                data: { type: "block" },
                type: "BlockStatement",
                suggestions: [{
                    messageId: "suggestComment",
                    data: { type: "block" },
                    output: "try { /* empty */ } catch (ex) {}"
                }]
            }]
        },

Review comment (suggestion):
```suggestion
                type: "SwitchStatement",
                suggestions: null
```

Code after:
                suggestions: [{
                    messageId: "suggestComment",
                    data: { type: "block" },
                    output: "while (foo) { /* empty */ }"
                }]
            }]
        },
        {
            code: "for (;foo;) {}",
            errors: [{
                messageId: "unexpected",
                data: { type: "block" },
                type: "BlockStatement",
                suggestions: [{
                    messageId: "suggestComment",
                    data: { type: "block" },
                    output: "for (;foo;) { /* empty */ }"
                }]
            }]
        },
        {
            code: "switch(foo) {}",
            errors: [{
                messageId: "unexpected",
                data: { type: "switch" },
                type: "SwitchStatement",
                suggestions: null
            }]
        },
        {
            code: "switch (foo) { /* empty */ }",
            errors: [{
                messageId: "unexpected",
                data: { type: "switch" },
                type: "SwitchStatement",
                suggestions: null
            }]
        },
        {
            code: "try {} catch (ex) {}",
            options: [{ allowEmptyCatch: true }],
            errors: [{
                messageId: "unexpected",
                data: { type: "block" },
                type: "BlockStatement",
                suggestions: [{
                    messageId: "suggestComment",
                    data: { type: "block" },
                    output: "try { /* empty */ } catch (ex) {}"
                }]
            }]