Getting Started with Conformance

Learn how to set up Conformance for your codebase.
Table of Contents

Conformance is available on Enterprise plans

To set up Conformance in your repository, you must:

If you've already set up Code Owners, you may have already completed some of these steps.

To enable Conformance for your Enterprise team, you'll need to request access through your Vercel account administrator.

Note: Conformance is available for Enterprise teams. To add it to your contract or upgrade to Enterprise, contact us

Contact Sales

Vercel distributes packages with the @vercel-private scope through our private npm registry, and requires that each user using the package authenticates through a Vercel account.

To use the private npm registry, you'll need to follow the documentation to:

This section guides you through setting up Conformance for your repository.

  1. The Conformance CLI is separate to the Vercel CLI, however it uses the Vercel CLI for authentication.

    Before continuing, please ensure that the Vercel CLI is installed and that you are logged in.

  2. Use the CLI to automatically initialize Conformance in your project. Start by running this command in your repository's root:

    pnpm
    yarn
    npm

    pnpm --package=@vercel-private/conformance dlx vercel-conformance init

    yarn dlx only works with Yarn version 2 or newer, for Yarn v1 use
    yarn -DW add @vercel-private/conformance && yarn vercel-conformance init

    After running, check the installation success by executing:

    pnpm
    yarn
    npm

    pnpm conformance

  3. The Conformance init command creates the following changes:

    • First, it installs the CLI package in your root package.json and every workspace package.json, if your monorepo uses workspaces.
    • It also adds a conformance script to the scripts field of every package.json. This script runs Conformance.
    • It adds any existing Conformance errors to allowlists, letting you start using Conformance without immediate fixes and allowing you to gradually resolve these allowlist entries over time. Learn more about Conformance Allowlists in the documentation.

    Once you've reviewed these, open a pull request with the changes and merge it.

  4. ** This step assumes you have set up Code Owners.**

    Conformance allows specific individuals to review modifications to allowlist files. Add a .vercel.approvers file at your repository's root:

    .vercel.approvers
    **/*.allowlist.json @org/team:required

    Now, changes to allowlist files need a review from someone on @org/team before merging.

    Learn more about wildcard syntax and :required syntax from Code Owners.

  5. You can integrate Conformance in your CI to avoid merging errors into your code. To learn more, see Setting up your CI provider.

Adding your repository to your team's Vercel dashboard, allows you to access the Conformance dashboard and see an overview of your Conformance stats.

    1. Ensure your team is selected in the scope selector.
    2. From your dashboard, select the Add New button and from the dropdown select Repository.
    3. Then, from the Add a new repository screen, find your Git repository that you wish to import and select Connect.
  1. Before you can connect a repository, you must ensure that the Vercel GitHub app has been installed for your team. You should ensure it is installed for either all repositories or for the repository you are trying to connect.

    Once installed, you'll be able to connect your repository.

  2. Connecting your repository brings you to the repository overview page.

    To view the Conformance dashboard at any time:

    1. Select the List View option on your team's dashboard
    2. Find your repository from the list and select the repository name
    3. View the Conformance overview, including information on Code Owners and other metadata
Last updated on July 23, 2024