Skip to content

Commit a250fad

Browse files
author
Josh Goldberg
authored
Exported lint rule types for Node APIs (#816)
* Exported lint rule types for Node APIs * Hmm, how did comma-dangle get in there... * Meh, just export it all
1 parent 1aea884 commit a250fad

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,46 @@
1+
/**
2+
* Severity level for an individual TSLint rule in a TSLint configuration file.
3+
*
4+
* @see https://palantir.github.io/tslint/usage/configuration
5+
*/
16
export type TSLintRuleSeverity = "warning" | "error" | "off";
27

8+
/**
9+
* Rich descriptor and options for an individual TSLint rule.
10+
*/
311
export type TSLintRuleOptions = {
412
ruleArguments: any[];
513
ruleName: string;
614
ruleSeverity: TSLintRuleSeverity;
715
};
816

17+
/**
18+
* Possible reported severities for an ESLint rule's configuration.
19+
*
20+
* @see https://eslint.org/docs/user-guide/configuring#configuring-rules
21+
*/
922
export type ESLintRuleSeverity = "warn" | "error" | "off";
1023

24+
/**
25+
* Permitted severities for an ESLint rule's configuration.
26+
*
27+
* @see https://eslint.org/docs/user-guide/configuring#configuring-rules
28+
*/
1129
export type RawESLintRuleSeverity = ESLintRuleSeverity | 0 | 1 | 2;
1230

31+
/**
32+
* Output descriptor and options for a converted ESLint rule.
33+
*/
1334
export type ESLintRuleOptions = {
1435
notices?: any[];
1536
ruleArguments?: any[];
1637
ruleName: string;
1738
ruleSeverity: ESLintRuleSeverity;
1839
};
1940

41+
/**
42+
* Output descriptor and options for a converted ESLint rule, including arguments.
43+
*/
2044
export type ESLintRuleOptionsWithArguments = ESLintRuleOptions & {
2145
ruleArguments: any[];
2246
};

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ export { findOriginalConfigurationsStandalone as findOriginalConfigurations } fr
44
export { findReportedConfigurationStandalone as findReportedConfiguration } from "./api/findReportedConfigurationStandalone";
55
export { formatOutput } from "./converters/lintConfigs/formatting/formatOutput";
66
export { joinConfigConversionResults } from "./converters/lintConfigs/joinConfigConversionResults";
7+
export * from "./converters/lintConfigs/rules/types";
78
export * from "./types";

0 commit comments

Comments
 (0)