@@ -8,12 +8,12 @@ import {
88import { applyDefault } from './applyDefault' ;
99
1010// we automatically add the url
11- type NamedCreateRuleMetaDocs = Omit < RuleMetaDataDocs , 'url' > ;
12- type NamedCreateRuleMeta < TMessageIds extends string > = {
11+ export type NamedCreateRuleMetaDocs = Omit < RuleMetaDataDocs , 'url' > ;
12+ export type NamedCreateRuleMeta < TMessageIds extends string > = {
1313 docs : NamedCreateRuleMetaDocs ;
1414} & Omit < RuleMetaData < TMessageIds > , 'docs' > ;
1515
16- interface CreateAndOptions <
16+ export interface RuleCreateAndOptions <
1717 TOptions extends readonly unknown [ ] ,
1818 TMessageIds extends string ,
1919 TRuleListener extends RuleListener ,
@@ -25,19 +25,19 @@ interface CreateAndOptions<
2525 defaultOptions : Readonly < TOptions > ;
2626}
2727
28- interface RuleWithMeta <
28+ export interface RuleWithMeta <
2929 TOptions extends readonly unknown [ ] ,
3030 TMessageIds extends string ,
3131 TRuleListener extends RuleListener ,
32- > extends CreateAndOptions < TOptions , TMessageIds , TRuleListener > {
32+ > extends RuleCreateAndOptions < TOptions , TMessageIds , TRuleListener > {
3333 meta : RuleMetaData < TMessageIds > ;
3434}
3535
36- interface RuleWithMetaAndName <
36+ export interface RuleWithMetaAndName <
3737 TOptions extends readonly unknown [ ] ,
3838 TMessageIds extends string ,
3939 TRuleListener extends RuleListener ,
40- > extends CreateAndOptions < TOptions , TMessageIds , TRuleListener > {
40+ > extends RuleCreateAndOptions < TOptions , TMessageIds , TRuleListener > {
4141 meta : NamedCreateRuleMeta < TMessageIds > ;
4242 name : string ;
4343}
@@ -48,7 +48,7 @@ interface RuleWithMetaAndName<
4848 * @param urlCreator Creates a documentation URL for a given rule name.
4949 * @returns Function to create a rule with the docs URL format.
5050 */
51- function RuleCreator ( urlCreator : ( ruleName : string ) => string ) {
51+ export function RuleCreator ( urlCreator : ( ruleName : string ) => string ) {
5252 // This function will get much easier to call when this is merged https://github.com/Microsoft/TypeScript/pull/26349
5353 // TODO - when the above PR lands; add type checking for the context.report `data` property
5454 return function createNamedRule <
@@ -106,5 +106,3 @@ function createRule<
106106}
107107
108108RuleCreator . withoutDocs = createRule ;
109-
110- export { RuleCreator } ;
0 commit comments