useBiomeIgnoreFolder (JSON)
Language JSON (and super languages)
Summary
Section titled “Summary”- Rule available since:
v2.2.0 - Diagnostic Category:
lint/suspicious/useBiomeIgnoreFolder - This rule is recommended, meaning it is enabled by default.
- This rule has a safe fix.
- The default severity of this rule is warning.
How to configure
Section titled “How to configure”{ "linter": { "rules": { "suspicious": { "useBiomeIgnoreFolder": "error" } } }}Description
Section titled “Description”Prefer folder exclusions that prevent Biome from scanning the folder.
A negated pattern such as !dist/** excludes files inside dist, but Biome still enters the
directory to discover them. Use !dist to exclude the folder itself and avoid unnecessary
filesystem traversal. The same applies to nested patterns such as !**/dist.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{ "files": { "includes": ["**", "!dist/**", "!**/dist/**"] }}{ "files": { "includes": ["**", "!dist", "!**/dist"] }}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.