Biome files.includes and Ignoring Paths
The files section in biome.json controls which paths Biome processes and which it skips.
In v2, files.includes uses one glob list with negation for excludes; v1 used separate include and ignore lists. Both are about scoping Biome to the right files.
What it does
files.includes (v2) takes a glob list where negated patterns (prefixed with !) exclude paths; v1 used files.include plus files.ignore. files.ignoreUnknown true tells Biome to skip files of types it does not understand instead of erroring. With vcs.useIgnoreFile, .gitignore entries are honored too.
Common usage
// Biome v2
{
"files": {
"includes": ["src/**", "!**/*.generated.ts", "!dist/**"],
"ignoreUnknown": true
}
}
// Biome v1
{
"files": { "include": ["src/**"], "ignore": ["dist/**", "**/*.generated.ts"] }
}Options
| Key | What it does |
|---|---|
| includes (v2) | Glob list; "!pattern" entries exclude |
| include / ignore (v1) | Separate allow and deny glob lists |
| ignoreUnknown | Skip unsupported file types instead of erroring |
| vcs.useIgnoreFile | Also honor .gitignore / .ignore |
In CI
Mismatched globs are the usual reason a CI run "passes" without checking anything: if includes is too narrow, Biome processes nothing and exits 0. Run biome ci on a known-bad file once to confirm your globs actually select the code you care about.
Common errors in CI
On v2, using v1 keys "include"/"ignore" gives "Found an unknown key"; switch to "includes" with negated globs. "The file <x> was ignored" in verbose output explains why a file is skipped. Without ignoreUnknown, an unsupported extension in scope can make the run error; set it to true on mixed repos.