Skip to content

Files

Latest commit

 

History

History
32 lines (22 loc) · 517 Bytes

no-empty-file.md

File metadata and controls

32 lines (22 loc) · 517 Bytes

Pattern: Meaningless file content

Issue: -

Description

Files containing only whitespace, comments, directives, empty statements, empty blocks, or hashbang clutter the codebase without providing any functional value.

Examples

Example of incorrect code:

// Only a comment
   
/* Multi-line
   comment */

{}

;

Example of correct code:

// A comment followed by actual code
const value = 42;

/* Multi-line comment */
function doSomething() {
  // Implementation
}