Skip to main content

disallow-tombi-empty-files-exclude

Disallow invalid files.exclude pattern lists in standalone Tombi config files.

Rule catalog ID: R006

Targeted pattern scopeโ€‹

This rule targets standalone Tombi config files visited by ESLint, normally through tombi.configs.configuration, tombi.configs.recommended, or tombi.configs.all.

What this rule reportsโ€‹

The rule reports files.exclude values that are present but malformed: non-array values, empty arrays, and empty string patterns inside the [files] section. It does not require files.exclude to be configured.

Why this rule existsโ€‹

An invalid exclude list is usually config noise. Removing it keeps the active Tombi policy easier to scan.

โŒ Incorrectโ€‹

[files]
exclude = []
[files]
exclude = "dist/**"

โœ… Correctโ€‹

[format]
[files]
exclude = ["dist/**"]

Further readingโ€‹