PropertyIsNotInValueGroup
When this happens
- ✓ The package is matched by at least one value group with
"strategy": "replace" - ✘ The property is within an object the group gives, but is not one of the keys the group gives that object
Example
In this example the value group is:
{ "valueGroups": [ { "strategy": "replace", "values": { "scripts": { "build": "tsc" } } } ]}{ "name": "my-package", "scripts": { "build": "tsc", "lint": "eslint" }}{ "name": "my-package", "scripts": { "build": "tsc" }}format --check shows the value the property has, and that it will be removed:
✘ PropertyIsNotInValueGroup at .scripts.lint "eslint" → (removed)Severity
Configurable via severity on a value group. format removes the property whatever its severity, and any object left empty by its removal which the group also removes. The severity decides how format --check treats it:
| Value | Effect |
|---|---|
"fix" | Default. Show as error; exits 1. |
"warn" | Show as warning; does not affect exit code. |
"error" | Show as error; exits 1. |
strict does not change it. When more than one value group removes the property, the severity of the last of them is used.