Disallow empty files ​
💼 This rule is enabled in the ✅ recommended config.
Meaningless files clutter a codebase.
Disallow any files only containing the following:
- Whitespace
- Comments
- Directives
- Empty statements
- Empty block statements
- Hashbang
Fail ​
js
js
// Commentjs
/* Comment */js
'use strict';js
;js
{
}js
#!/usr/bin/env nodePass ​
js
const x = 0;js
'use strict';
const x = 0;js
;;
const x = 0;js
{
const x = 0;
}