Skip to content

unicorn/empty-brace-spaces Style

🛠️ An auto-fix is available for this rule.

What it does

Removes the extra spaces or new line characters inside a pair of braces that does not contain additional code.

Why is this bad?

There should be no spaces inside a pair of braces as it affects the overall readability of the code.

Example

javascript
const a = {};
class A {}

References

Released under the MIT License.