Menu
Important
Stay updated on React2Shell

forbidden-properties

Last updated March 4, 2025

Conformance is available on Enterprise plans

The rule type enables you to disallow reading from, writing to, and/or calling one or more properties.

  • Disallowing use of global properties
    • You want to disallow calling
    • You want to disallow using browser-only APIs in a component library that may be server-rendered
    • You want to disallow calls to usage of in favor of another solution.
  • Disallowing use of deprecated features
    • You want to disallow using
    • You want to disallow specific strings from being used within code

To create a custom rule, you'll need to configure the below required properties:

PropertyTypeDescription
The custom rule's type.
The custom rule's name.
The error message, which is shown to users when they encounter this rule.
(optional)An optional link to show alongside the error message.
(optional)The rule description, which is shown in the Vercel Compass dashboard and included in allowlist files.
(optional)The rule severity added to the allowlists and used to calculate a project's conformance score.
One or more properties and their forbidden operations.

PropertyTypeDescription
The property to target.
The operation(s) to target. At least one operation is required.

The example below configures a rule named that disallows calling .

Note that a property's assignments are tracked by this custom rule type.

Using our example rule (above), the following calls will both result in errors.

The example below enables the custom rule. In this example, the custom rule is also restricted to the and workspaces, which is optional.

;


Was this helpful?

supported.