jsii
Version:
[](https://cdk.dev) [](https://github.com/aws/jsii
34 lines • 1.42 kB
TypeScript
import { TypeScriptConfigValidationRuleSet } from '.';
import { RuleDescription } from './validator';
/**
* Human-readable descriptions for each tsconfig validation rule set.
*
* These are surfaced both as CLI option help (e.g. for `--validate-tsconfig` and
* `--rule-set`) and as the heading when printing a rule set via `formatRuleSet`.
*/
export declare const RULE_SET_DESCRIPTIONS: {
[choice in TypeScriptConfigValidationRuleSet]: string;
};
/**
* Render a single rule set (its `compilerOptions` rules) as a human-readable block.
*
* @param ruleSet the rule set to render
* @returns a multi-line string suitable for printing to the console
*/
export declare function formatRuleSet(ruleSet: TypeScriptConfigValidationRuleSet): string;
/**
* Render a single rule's constraint as a human-readable phrase.
*
* @param rule the rule description to render
* @returns a phrase such as `must be one of: es2022, es2023` or `not allowed`
*/
export declare function formatConstraint(rule: RuleDescription): string;
/**
* Render a single hinted value as a highlighted code literal. Strings are shown
* verbatim (as a user writes them in tsconfig.json), everything else is JSON-encoded.
*
* @param value the hinted value to render
* @returns the value as a (possibly colorized) code literal
*/
export declare function formatRuleValue(value: any): string;
//# sourceMappingURL=rule-set-format.d.ts.map