Skip to content

types-kit-config

Build npm version

TypeScript type definitions for rnx-kit configuration, dependency alignment, and lint rules. This package exists to break circular dependencies between rnx-kit packages that share these types.

Terminal window
yarn add @rnx-kit/types-kit-config --dev

or if you’re using npm

Terminal window
npm add --save-dev @rnx-kit/types-kit-config
import type {
KitConfig,
AlignDepsConfig,
Capability,
} from "@rnx-kit/types-kit-config";

Configuration for an rnx-kit package, stored in the rnx-kit field of package.json.

Name Type Description
extends string | undefined Load base config from file or module.
kitType KitType | undefined Whether this kit is an "app" or a "library". Defaults to "library".
alignDeps AlignDepsConfig | undefined Configures how align-deps should align dependencies for this package.
bundle BundleConfig | BundleConfig[] | undefined Specifies how the package is bundled.
server ServerConfig | undefined Specifies how the package’s bundle server is configured.
lint object | undefined Configures rnx-kit linting tools and their rules.
type KitType = "app" | "library";

A record mapping package names to version strings.

A function returning a DependencyVersions record.

Configuration for the align-deps dependency alignment tool.

Name Type Description
presets string[] | undefined Presets to use for aligning dependencies.
requirements string[] | { development: string[]; production: string[] } Requirements for this package, e.g. react-native@>=0.66.
capabilities Capability[] | undefined Capabilities used by the kit.

Well-known capability names used by align-deps for dependency management. Includes platform cores (core, core-android, core-ios, etc.), Metro tooling (metro, metro-config), navigation (navigation/native, navigation/stack), and many common React Native libraries.

Meta-capabilities that aggregate other capabilities (e.g. "core/testing").

Base options shared by all lint rules.

Name Type Description
enabled boolean | undefined Whether to enable this rule. Defaults to true.

Options for the no-duplicates lockfile lint rule. Extends RuleBaseOptions.

Name Type Description
packages readonly (string | readonly [string, number])[] | undefined List of packages to check for duplicates.

Options for the no-workspace-package-from-npm lockfile lint rule. Extends RuleBaseOptions.