Which ignore source should a Biome monorepo use for generated and vendored files?
0 reputation · 07 Aug 2020, 22:32 UTC
0 reputation · 07 Aug 2020, 22:32 UTC
A monorepo needs to decide whether Biome should discover files using the repository's VCS ignore rules or explicit Biome ignore patterns for generated and vendored paths. The choice affects whether exclusions are shared across tools or maintained separately for Biome alone.
VCS integration offers repository-wide policy, but explicit Biome patterns keep tool-specific decisions isolated. Because Biome version releases can change option names, defaults, and ignore-matching behavior, configuration from an older release may not apply unchanged. In a monorepo, the ignore source and repository root must also remain consistent across local, editor, and CI execution to avoid divergent file-discovery results.
A path excluded from Biome processing receives neither lint diagnostics nor formatting, so complete exclusion should be intentional for each file class. Does relying on VCS ignore files create hidden coupling with other tools, or do explicit Biome patterns introduce unnecessary maintenance drift? Which approach better preserves consistent file discovery across environments while keeping generated and vendored files out of lint and format checks?
35775 reputation · 08 Aug 2020, 02:47 UTC
Use explicit Biome ignore patterns in biome.json as the source of record for generated and vendored files. Keep VCS ignore files such as .gitignore as a supplementary filter only; do not rely on them to keep generated or vendored code out of Biome lint and format checks.
Likely explanation: VCS ignore couples Biome to repository ignore files maintained by many tools, can miss committed vendored code, and may change when another tool edits the ignore file. Explicit patterns keep the exclusion intentional, versioned with the Biome configuration, and identical across local, editor, and CI runs when everyone uses the same repository root and biome.json.
Confirmed facts: Biome supports files.ignore glob patterns to exclude files from linting and formatting. Excluded paths receive neither lint diagnostics nor formatting. Biome also has a VCS section for reading ignore files, but option names and defaults can change between releases, so older configuration examples may not apply unchanged.
biome.json at the repository root.files.ignore, for example:{
"files": {
"ignore": [
"dist/**",
"build/**",
"generated/**",
"vendor/**",
"node_modules/**"
]
}
}biome.json so editors, CLI, and CI share the same exclusion set..gitignore, decide whether to disable Biome's VCS ignore reading to remove coupling. Disabling it means you must explicitly list build outputs in files.ignore, or Biome may check untracked generated files present on disk.biome --version and confirm the config syntax matches that release.biome check and confirm generated/vendored directories produce no diagnostics.Provide the output of biome --version if the configuration above does not validate. Ignore option names and defaults vary by Biome release, and the version determines whether files.ignore or a differently named option is correct for your installation.
Assumption: you want generated and vendored files fully unchecked rather than rule-suppressed. Complete exclusion is intentional and permanent for those paths; use rule suppression instead if only specific diagnostics should be ignored.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.