diff --git a/src/converters/lintConfigs/rules/types.ts b/src/converters/lintConfigs/rules/types.ts index e0016d435..942033d51 100644 --- a/src/converters/lintConfigs/rules/types.ts +++ b/src/converters/lintConfigs/rules/types.ts @@ -1,15 +1,36 @@ +/** + * Severity level for an individual TSLint rule in a TSLint configuration file. + * + * @see https://palantir.github.io/tslint/usage/configuration + */ export type TSLintRuleSeverity = "warning" | "error" | "off"; +/** + * Rich descriptor and options for an individual TSLint rule. + */ export type TSLintRuleOptions = { ruleArguments: any[]; ruleName: string; ruleSeverity: TSLintRuleSeverity; }; +/** + * Possible reported severities for an ESLint rule's configuration. + * + * @see https://eslint.org/docs/user-guide/configuring#configuring-rules + */ export type ESLintRuleSeverity = "warn" | "error" | "off"; +/** + * Permitted severities for an ESLint rule's configuration. + * + * @see https://eslint.org/docs/user-guide/configuring#configuring-rules + */ export type RawESLintRuleSeverity = ESLintRuleSeverity | 0 | 1 | 2; +/** + * Output descriptor and options for a converted ESLint rule. + */ export type ESLintRuleOptions = { notices?: any[]; ruleArguments?: any[]; @@ -17,6 +38,9 @@ export type ESLintRuleOptions = { ruleSeverity: ESLintRuleSeverity; }; +/** + * Output descriptor and options for a converted ESLint rule, including arguments. + */ export type ESLintRuleOptionsWithArguments = ESLintRuleOptions & { ruleArguments: any[]; }; diff --git a/src/index.ts b/src/index.ts index 12bfb1a61..1de4fcb09 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,4 +4,5 @@ export { findOriginalConfigurationsStandalone as findOriginalConfigurations } fr export { findReportedConfigurationStandalone as findReportedConfiguration } from "./api/findReportedConfigurationStandalone"; export { formatOutput } from "./converters/lintConfigs/formatting/formatOutput"; export { joinConfigConversionResults } from "./converters/lintConfigs/joinConfigConversionResults"; +export * from "./converters/lintConfigs/rules/types"; export * from "./types";