Skip to content

Files

Latest commit

 

History

History
21 lines (15 loc) · 383 Bytes

empty-brace-spaces.md

File metadata and controls

21 lines (15 loc) · 383 Bytes

Pattern: Extra space in empty braces

Issue: -

Description

Empty braces should not contain extra spaces or newlines as they reduce code readability. Keep empty braces concise without any whitespace between them.

Examples

Example of incorrect code:

const obj = { };
class A { }

Example of correct code:

const obj = {};
class A {}