JSON Rules
Below the list of rules supported by Biome, divided by group. Here’s a legend of the emojis:
- The icon indicates that the rule is part of the recommended rules.
- The icon indicates that the rule provides a code action (fix) that is safe to apply.
- The icon indicates that the rule provides a code action (fix) that is unsafe to apply.
- The icon indicates that the rule has been implemented and scheduled for the next release.
nursery
Section titled “nursery”| Rule name | Description | Properties |
|---|---|---|
| noEmptyObjectKeys | Disallow empty keys in JSON objects. | |
| noJsonUnsafeValues | Disallow unsafe JSON values that may cause interoperability issues. | |
| noRestrictedDependencies | Disallow dependencies that are known to have better alternatives. | |
| noTopLevelLiterals | Require the JSON top-level value to be an array or object. | |
| noUntrustedLicenses | Disallow dependencies with untrusted licenses. | |
| useConsistentObjectKeys | Enforce JSON keys with consistent Unicode representation. |
suspicious
Section titled “suspicious”| Rule name | Description | Properties |
|---|---|---|
| noBiomeFirstException | Disallow ineffective ordering in files.includes patterns. | |
| noDuplicateDependencies | Disallow duplicate dependencies in package.json. | |
| noDuplicateObjectKeys | Disallow duplicate keys in JSON objects. | |
| noQuickfixBiome | Disallow quickfix.biome in supported editor settings. | |
| useBiomeIgnoreFolder | Prefer folder exclusions that prevent Biome from scanning the folder. | |
| useRequiredScripts | Require configured scripts in package.json. |
Recommended rules
Section titled “Recommended rules”- noBiomeFirstException (Severity: error)
- noDuplicateObjectKeys (Severity: error)
- noQuickfixBiome (Severity: information)
- useBiomeIgnoreFolder (Severity: warning)
Missing a rule? Help us by contributing to the analyzer or create a rule suggestion here.
Copyright (c) 2023-present Biome Developers and Contributors.