Skip to content
This documentation is for v14 and up, the docs for v13 are archived.

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:

.syncpackrc.json
{
"valueGroups": [
{
"strategy": "replace",
"values": {
"scripts": {
"build": "tsc"
}
}
}
]
}
This package.json...
{
"name": "my-package",
"scripts": {
"build": "tsc",
"lint": "eslint"
}
}
...is formatted as
{
"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:

ValueEffect
"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.