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

PropertyIsBannedByValueGroup

When this happens

  • ✓ The package is matched by at least one value group
  • ✘ The property exists, but the group gives it the value null

A property which a "replace" group removes because it does not list it is reported as PropertyIsNotInValueGroup instead.

When removing the property leaves an object empty, the property is reported, not the object: .scripts.prepublish in the example below, rather than .scripts.

Example

In this example the value group is:

.syncpackrc.json
{
"valueGroups": [
{
"values": {
"scripts.prepublish": null
}
}
]
}
This package.json...
{
"name": "my-package",
"scripts": {
"prepublish": "tsc"
}
}
...is formatted as
{
"name": "my-package"
}

format --check shows the value the property has, and that it will be removed:

✘ PropertyIsBannedByValueGroup at .scripts.prepublish "tsc" → (removed)

Severity

Not configurable via severity. format --check reports it as an error and exits 1. format fixes it: it removes the property, and any object left empty by its removal.