Skip to content

unicorn/no-empty-file Correctness

This rule is turned on by default.

What it does

Disallows any files only containing the following:

  • Whitespace
  • Comments
  • Directives
  • Empty statements
  • Empty blocks
  • Hashbang

Why is this bad?

Meaningless files clutter a codebase.

How to use

To enable this rule in the CLI or using the config file, you can use:

bash
oxlint --deny unicorn/no-empty-file
json
{
  "rules": {
    "unicorn/no-empty-file": "error"
  }
}

References

Released under the MIT License.