noBiomeFirstException (JSON)
Language JSON (and super languages)
Summary
Section titled “Summary”- Rule available since:
v2.2.0 - Diagnostic Category:
lint/suspicious/noBiomeFirstException - This rule is recommended, meaning it is enabled by default.
- This rule has a safe fix.
- The default severity of this rule is error.
How to configure
Section titled “How to configure”{ "linter": { "rules": { "suspicious": { "noBiomeFirstException": "error" } } }}Description
Section titled “Description”Disallow ineffective ordering in files.includes patterns.
A pattern beginning with ! excludes matching paths. If an exclusion is first, no earlier
pattern has included files for it to remove, so Biome matches no files. Start with an
inclusion pattern, then add exclusions.
See the file exclusion guide for more examples.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{ "files": { "includes": ["!dist"] }}{ "files": { "includes": ["src/**", "!dist"] }}Extended configurations
Section titled “Extended configurations”The catch-all pattern ** includes every path. When an extended configuration already
starts with **, repeating that pattern at the start of the local configuration is
redundant. Keep the inherited catch-all and add only the local exclusions.
Invalid
Section titled “Invalid”{ "extends": ["./base.json"], "files": { "includes": ["**", "!**/test"] }}{ "files": { "includes": ["**", "!**/dist"] }}{ "extends": ["./base.json"], "files": { "includes": ["!**/test"] }}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.