Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/converters/lintConfigs/rules/types.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
/**
* 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[];
ruleName: string;
ruleSeverity: ESLintRuleSeverity;
};

/**
* Output descriptor and options for a converted ESLint rule, including arguments.
*/
export type ESLintRuleOptionsWithArguments = ESLintRuleOptions & {
ruleArguments: any[];
};
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";