types-kit-config
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.
Installation
Section titled “Installation”yarn add @rnx-kit/types-kit-config --devor if you’re using npm
npm add --save-dev @rnx-kit/types-kit-configimport type { KitConfig, AlignDepsConfig, Capability,} from "@rnx-kit/types-kit-config";Configuration Types
Section titled “Configuration Types”KitConfig
Section titled “KitConfig”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. |
KitType
Section titled “KitType”type KitType = "app" | "library";DependencyVersions
Section titled “DependencyVersions”A record mapping package names to version strings.
GetDependencyVersions
Section titled “GetDependencyVersions”A function returning a DependencyVersions record.
Dependency Alignment Types
Section titled “Dependency Alignment Types”AlignDepsConfig
Section titled “AlignDepsConfig”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. |
Capability
Section titled “Capability”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.
MetaCapability
Section titled “MetaCapability”Meta-capabilities that aggregate other capabilities (e.g. "core/testing").
Lint Rule Types
Section titled “Lint Rule Types”RuleBaseOptions
Section titled “RuleBaseOptions”Base options shared by all lint rules.
| Name | Type | Description |
|---|---|---|
| enabled | boolean | undefined |
Whether to enable this rule. Defaults to true. |
NoDuplicatesRuleOptions
Section titled “NoDuplicatesRuleOptions”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. |
NoWorkspacePackageFromNpmRuleOptions
Section titled “NoWorkspacePackageFromNpmRuleOptions”Options for the no-workspace-package-from-npm lockfile lint rule. Extends
RuleBaseOptions.