useBiomeIgnoreFolder
Summary
Section titled “Summary”- Diagnostic Category:
lint/suspicious/useBiomeIgnoreFolder
- This rule is recommended, which means is enabled by default.
- This rule has a safe fix.
- The default severity of this rule is warning.
Description
Section titled “Description”Promotes the correct usage for ignoring folders in the configuration file.
Starting Biome v2.2, ignoring folders doesn’t require the use of the trailing /**
.
When using the pattern /**
, you tell Biome to ignore all files inside a folder, but the folder is still crawled. This pattern
can lead to poor performance, especially if the folder contains many files.
If the intention is to ignore specific files inside a folder, the trailing pattern /**
shouldn’t be used.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{ "files": { "includes": ["**", "!dist/**", "!**/dist/**"] }}
{ "files": { "includes": ["**", "!dist", "!**/dist"] }}
How to configure
Section titled “How to configure”{ "linter": { "rules": { "suspicious": { "useBiomeIgnoreFolder": "error" } } }}